fix payments not working with last change

This commit is contained in:
2023-08-08 16:08:38 +02:00
parent 234d809ebf
commit 3e95dfeee3
4 changed files with 26 additions and 21 deletions

View File

@@ -177,11 +177,10 @@
unavailableSeats[ data.reserved[ seat ].component ][ data.reserved[ seat ].id ] = 'nav';
}
}
for ( let seat in data.user ) {
if ( data.user[ seat ] ) {
if ( !unavailableSeats[ data.user[ seat ].component ] ) {
unavailableSeats[ data.reserved[ seat ].component ] = {};
unavailableSeats[ data.user[ seat ].component ] = {};
}
unavailableSeats[ data.user[ seat ].component ][ data.user[ seat ].id ] = 'sel';
}
@@ -293,15 +292,15 @@
this.draggables = this.scaleUp( JSON.parse( sessionStorage.getItem( 'seatplan' ) ) );
}
if ( this.cart[ this.event.eventID ] ) {
let tickets = this.cart[ this.event.eventID ][ 'tickets' ];
for ( let seat in tickets ) {
if ( !this.unavailableSeats[ data.user[ seat ].component ] ) {
this.unavailableSeats[ data.reserved[ seat ].component ] = {};
}
this.unavailableSeats[ tickets[ seat ].component ][ tickets[ seat ].id ] = 'sel';
}
}
// if ( this.cart[ this.event.eventID ] ) {
// let tickets = this.cart[ this.event.eventID ][ 'tickets' ];
// for ( let seat in tickets ) {
// if ( !this.unavailableSeats[ data.user[ seat ].component ] ) {
// this.unavailableSeats[ data.reserved[ seat ].component ] = {};
// }
// this.unavailableSeats[ tickets[ seat ].component ][ tickets[ seat ].id ] = 'sel';
// }
// }
},
scaleUp ( valueArray ) {

View File

@@ -48,6 +48,7 @@
if ( e.data === 'ready' ) {
self.$refs.notification.cancelNotification( startNotification );
self.$refs.notification.createNotification( 'Your tickets are ready! Starting download...', 10, 'progress', 'normal' );
localStorage.removeItem( 'cart' );
setTimeout( () => {
open( '/tickets/tickets.pdf' );
source.close();