small changes

This commit is contained in:
2023-09-17 17:24:59 +02:00
parent cd9d6d5027
commit fb8c3b1824

View File

@@ -330,8 +330,7 @@
}; };
fetch( localStorage.getItem( 'url' ) + '/admin/api/saveSeatplanDraft', options ).then( res => { fetch( localStorage.getItem( 'url' ) + '/admin/api/saveSeatplanDraft', options ).then( res => {
if ( res.status === 200 ) { if ( res.status === 200 ) {
res.text().then( text => { res.text().then( () => {
console.log( text );
this.$refs.notification.cancelNotification( progressNotification ); this.$refs.notification.cancelNotification( progressNotification );
this.$refs.notification.createNotification( 'Saved as draft', 5, 'ok', 'normal' ); this.$refs.notification.createNotification( 'Saved as draft', 5, 'ok', 'normal' );
} ); } );
@@ -343,6 +342,7 @@
// TODO: add warning if no component has a seat start point if any component is a seat component // TODO: add warning if no component has a seat start point if any component is a seat component
}, },
deploy () { deploy () {
this.getSeatCount();
let deployNotification = this.$refs.notification.createNotification( 'Deploying...', 5, 'progress', 'normal' ); let deployNotification = this.$refs.notification.createNotification( 'Deploying...', 5, 'progress', 'normal' );
const options = { const options = {
method: 'post', method: 'post',
@@ -354,8 +354,7 @@
}; };
fetch( localStorage.getItem( 'url' ) + '/admin/api/saveSeatplan', options ).then( res => { fetch( localStorage.getItem( 'url' ) + '/admin/api/saveSeatplan', options ).then( res => {
if ( res.status === 200 ) { if ( res.status === 200 ) {
res.text().then( text => { res.text().then( () => {
console.log( text );
this.$refs.notification.cancelNotification( deployNotification ); this.$refs.notification.cancelNotification( deployNotification );
this.$refs.notification.createNotification( 'Deployed successfully', 5, 'ok', 'normal' ); this.$refs.notification.createNotification( 'Deployed successfully', 5, 'ok', 'normal' );
} ); } );