From 4bacd4aa8f555b603b5fb13b9b54828d5a906fe0 Mon Sep 17 00:00:00 2001 From: Janis Hutz Date: Sun, 20 Aug 2023 11:55:58 +0200 Subject: [PATCH] some styling for event details view --- src/webapp/main/src/views/purchasing/OrderView.vue | 2 +- src/webapp/main/src/views/purchasing/PurchaseView.vue | 3 +++ src/webapp/main/src/views/purchasing/TicketsDetailsView.vue | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/webapp/main/src/views/purchasing/OrderView.vue b/src/webapp/main/src/views/purchasing/OrderView.vue index 2e79e87..fac9982 100644 --- a/src/webapp/main/src/views/purchasing/OrderView.vue +++ b/src/webapp/main/src/views/purchasing/OrderView.vue @@ -91,7 +91,7 @@ methods: { setActiveTicket ( id ) { sessionStorage.setItem( 'selectedTicket', id ); - sessionStorage.setItem( 'ticketData', { 'description': this.events[ id ][ 'description' ], 'name': this.events[ id ][ 'name' ], 'locationName': this.events[ id ][ 'locationName' ] } ); + sessionStorage.setItem( 'ticketData', JSON.stringify( { 'description': this.events[ id ][ 'description' ], 'name': this.events[ id ][ 'name' ], 'locationName': this.events[ id ][ 'locationName' ] } ) ); sessionStorage.setItem( 'hasSeatplan', this.events[ id ][ 'hasSeatplan' ] ); }, loadEvents () { diff --git a/src/webapp/main/src/views/purchasing/PurchaseView.vue b/src/webapp/main/src/views/purchasing/PurchaseView.vue index 0005507..6f75121 100644 --- a/src/webapp/main/src/views/purchasing/PurchaseView.vue +++ b/src/webapp/main/src/views/purchasing/PurchaseView.vue @@ -302,6 +302,9 @@ export default { this.$refs.notification.createNotification( 'Please confirm your email address to proceed', 10, 'error', 'high' ); } } ); + } else { + this.$refs.notification.cancelNotification( prep ); + this.$refs.notification.createNotification( 'An error occurred during preparation of payments. Please try again.', 10, 'error', 'high' ); } } ).catch( err => { console.error( err ); diff --git a/src/webapp/main/src/views/purchasing/TicketsDetailsView.vue b/src/webapp/main/src/views/purchasing/TicketsDetailsView.vue index d7e1a59..87583d2 100644 --- a/src/webapp/main/src/views/purchasing/TicketsDetailsView.vue +++ b/src/webapp/main/src/views/purchasing/TicketsDetailsView.vue @@ -66,10 +66,14 @@ this.event[ 'banner' ] = localStorage.getItem( 'url' ) + '/eventAssets/' + this.eventID + '-banner.jpg'; this.event[ 'logo' ] = localStorage.getItem( 'url' ) + '/eventAssets/' + this.eventID + '-logo.jpg'; this.event[ 'banner' ] = localStorage.getItem( 'url' ) + '/otherAssets/logo.png'; + const eventData = JSON.parse( sessionStorage.getItem( 'ticketData' ) ); + this.event.name = eventData[ 'name' ]; + this.event.description = eventData[ 'description' ]; + this.event.location = eventData[ 'locationName' ]; }, data() { return { - event: { 'name': 'TestEvent', 'description': 'This is a description for the TestEvent to test multiline support and proper positioning of the Fields', 'location': 'test', 'date': '2023-07-15', 'currency': 'CHF', 'categories': { '1': { 'price': { '1':25, '2':35 }, 'bg': 'black', 'fg': 'white', 'name': 'Category 1' }, '2': { 'price': { '1':15, '2':20 }, 'bg': 'green', 'fg': 'white', 'name': 'Category 2' } }, 'ageGroups': { '1':{ 'id': 1, 'name':'Child', 'age':'0 - 15.99' }, '2':{ 'id': 2, 'name': 'Adult' } }, 'maxTickets': 2 }, + event: {}, } } };