mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 05:14:23 +00:00
fix bug in seat plan editor (loading broken)
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user