fix bug in seat plan editor (loading broken)

This commit is contained in:
2023-09-01 09:50:40 +02:00
parent e26369f133
commit bac321f48e
3 changed files with 33 additions and 5 deletions

View File

@@ -132,7 +132,17 @@
};
// Auto save every 60s (60K ms)
this.autoSave = setInterval( this.saveDraft(), 60000 );
this.autoSave = setInterval( () => {
const options = {
method: 'post',
body: JSON.stringify( { 'data':{ 'seatInfo': this.seatCountInfo, 'data': this.scaleDown( this.draggables ) }, 'location': sessionStorage.getItem( 'locationID' ) } ),
headers: {
'Content-Type': 'application/json',
'charset': 'utf-8'
}
};
fetch( localStorage.getItem( 'url' ) + '/admin/api/saveSeatplanDraft', options );
}, 60000 );
/*
Calculate scale factor (this adds support for differently sized screens)

View File

@@ -9,7 +9,7 @@
<template>
<div>
<h2>Seat Plan Editor</h2>
<h2>Seat Plan Editor ({{ location }})</h2>
<window />
</div>
</template>
@@ -18,6 +18,11 @@
import window from '@/components/seatplan/editor/window.vue';
export default {
data () {
return {
location: '',
};
},
components: {
window,
},
@@ -26,6 +31,7 @@
if ( !sessionStorage.getItem( 'locationID' ) ) {
this.$router.push( '/admin/locations' );
}
this.location = sessionStorage.getItem( 'locationID' );
}
},
created() {