various bugfixes

This commit is contained in:
2023-07-27 15:10:14 +02:00
parent 88f16c0421
commit b8b6467633
6 changed files with 14 additions and 7 deletions

View File

@@ -131,7 +131,6 @@ export default {
},
watch: {
scaleFactor() {
console.log( 'scaleFactor' );
this.setScaleFactor();
},
h() {
@@ -144,7 +143,6 @@ export default {
this.calculateChairs();
},
unavailable() {
console.log( 'updating' );
this.calculateChairs();
}
},

View File

@@ -158,6 +158,7 @@
this.seatChecks();
// TODO: Optimise for odd screen sizes and aspect ratios and fucking webkit
// TODO: Trim scroll box to about 200px more than seatplan size
sessionStorage.setItem( 'seatplan', JSON.stringify( this.scaleDown( this.draggables ) ) );
window.addEventListener( 'visibilitychange', ( e ) => {
this.seatPlanInit();
}, 1 );
@@ -170,6 +171,7 @@
if ( res.status === 200 ) {
let unavailableSeats = {};
res.json().then( data => {
console.log( data );
for ( let seat in data.booked ) {
if ( !unavailableSeats[ data.booked[ seat ].component ] ) {
unavailableSeats[ data.booked[ seat ].component ];
@@ -383,6 +385,10 @@
setTimeout( () => {
this.$refs.popups.openPopup( 'Unfortunately, the seat you just tried to select was reserved by somebody else since the last time the seat plan was refreshed. Please select another one. We are sorry for the inconvenience.', {}, 'string' );
}, 300 );
} else if ( res.status === 418 ) {
setTimeout( () => {
this.$refs.popups.openPopup( 'We are sorry, but you have already selected the maximum amount of tickets you can buy.', {}, 'string' );
}, 300 );
}
} );
}

View File

@@ -19,7 +19,7 @@ app.use( createPinia() );
let userStore = useUserStore();
let prod = false;
let prod = true;
if ( prod ) {
fetch( '/api/getAuth' ).then( res => {