mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
reset database, update imports, prepare for build
This commit is contained in:
@@ -368,6 +368,7 @@ export default {
|
||||
reserveTicket ( option ) {
|
||||
if ( option.status == 'ok' && option.data ) {
|
||||
// Make call to server to reserve ticket to have server also keep track of reserved tickets
|
||||
let progressNot = this.$refs.notification.createNotification( 'Reserving ticket...', 20, 'progress', 'normal' );
|
||||
const options = {
|
||||
method: 'post',
|
||||
body: JSON.stringify( { 'id': this.selectedSeat[ 'id' ], 'component': this.selectedSeat[ 'componentID' ], 'ticketOption': option.data, 'eventID': this.event.eventID, 'category': this.draggables[ this.selectedSeat[ 'componentID' ] ].category, 'name': this.selectedSeat.displayName } ),
|
||||
@@ -378,6 +379,7 @@ export default {
|
||||
};
|
||||
fetch( localStorage.getItem( 'url' ) + '/API/reserveTicket', options ).then( res => {
|
||||
if ( res.status === 200 ) {
|
||||
this.$refs.notification.cancelNotification( progressNot );
|
||||
this.$refs[ 'component' + this.selectedSeat.componentID ][ 0 ].validateSeatSelection( this.selectedSeat, option.data );
|
||||
this.cartHandling( 'select', option.data );
|
||||
} else if ( res.status === 409 ) {
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
<!-- eslint-disable no-undef -->
|
||||
<template>
|
||||
<div id="notifications" @click="handleNotifications();">
|
||||
<div class="message-box" :class="[ location, size ]">
|
||||
@@ -16,7 +17,7 @@
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'notificationsAPI',
|
||||
name: 'notifications',
|
||||
props: {
|
||||
location: {
|
||||
type: String,
|
||||
@@ -75,10 +76,14 @@ export default {
|
||||
*/
|
||||
try {
|
||||
delete this.notifications[ id ];
|
||||
delete this.queue[ this.queue.findIndex( id ) ];
|
||||
} catch ( error ) {
|
||||
console.log( 'notification to be deleted is nonexistent or currently being displayed' );
|
||||
}
|
||||
try {
|
||||
this.queue.splice( this.queue.indexOf( id ), 1 );
|
||||
} catch {
|
||||
console.debug( 'queue empty' );
|
||||
}
|
||||
if ( this.currentlyDisplayedNotificationID == id ) {
|
||||
this.handleNotifications();
|
||||
}
|
||||
@@ -97,10 +102,13 @@ export default {
|
||||
this.priority = this.notifications[ this.queue[ 0 ] ][ 'priority' ];
|
||||
this.currentlyDisplayedNotificationID = this.notifications[ this.queue[ 0 ] ][ 'id' ];
|
||||
this.notificationDisplayTime = this.notifications[ this.queue[ 0 ] ][ 'showDuration' ];
|
||||
delete this.notifications[ this.queue[ 0 ] ];
|
||||
this.queue.reverse();
|
||||
this.queue.pop();
|
||||
$( '.message-box' ).css( 'z-index', 20 );
|
||||
} else {
|
||||
this.messageType = 'hide';
|
||||
$( '.message-box' ).css( 'z-index', -1 );
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -122,56 +130,16 @@ export default {
|
||||
<style scoped>
|
||||
.message-box {
|
||||
position: fixed;
|
||||
z-index: 10;
|
||||
z-index: -1;
|
||||
color: white;
|
||||
transition: all 0.5s;
|
||||
}
|
||||
|
||||
.default {
|
||||
width: 95vw;
|
||||
right: 2.5vw;
|
||||
top: 1vh;
|
||||
height: 10vh;
|
||||
width: 15vw;
|
||||
}
|
||||
|
||||
.small {
|
||||
height: 7vh;
|
||||
width: 11vw;
|
||||
}
|
||||
|
||||
.big {
|
||||
height: 12vh;
|
||||
width: 17vw;
|
||||
}
|
||||
|
||||
.bigger {
|
||||
height: 15vh;
|
||||
width: 20vw;
|
||||
}
|
||||
|
||||
.huge {
|
||||
height: 20vh;
|
||||
width: 25vw;
|
||||
}
|
||||
|
||||
.topleft {
|
||||
top: 3vh;
|
||||
left: 0.5vw;
|
||||
}
|
||||
|
||||
.topright {
|
||||
top: 3vh;
|
||||
right: 0.5vw;
|
||||
}
|
||||
|
||||
.bottomright {
|
||||
bottom: 3vh;
|
||||
right: 0.5vw;
|
||||
}
|
||||
|
||||
.bottomleft {
|
||||
top: 3vh;
|
||||
right: 0.5vw;
|
||||
}
|
||||
|
||||
|
||||
.message-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -182,7 +150,7 @@ export default {
|
||||
transition: all 0.5s;
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
|
||||
.types {
|
||||
color: white;
|
||||
border-radius: 100%;
|
||||
@@ -191,40 +159,41 @@ export default {
|
||||
padding: 1.5%;
|
||||
font-size: 200%;
|
||||
}
|
||||
|
||||
|
||||
.message {
|
||||
margin-right: 5%;
|
||||
text-align: end;
|
||||
}
|
||||
|
||||
|
||||
.ok {
|
||||
background-color: rgb(1, 71, 1);
|
||||
}
|
||||
|
||||
|
||||
.error {
|
||||
background-color: rgb(114, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
.info {
|
||||
background-color: rgb(44, 112, 151);
|
||||
}
|
||||
|
||||
|
||||
.warning {
|
||||
background-color: orange;
|
||||
}
|
||||
|
||||
|
||||
.hide {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
|
||||
.progress {
|
||||
z-index: 20;
|
||||
background-color: rgb(0, 0, 99);
|
||||
}
|
||||
|
||||
|
||||
.progress-spinner {
|
||||
animation: spin 2s infinite linear;
|
||||
}
|
||||
|
||||
|
||||
@keyframes spin {
|
||||
from {
|
||||
transform: rotate( 0deg );
|
||||
@@ -233,4 +202,80 @@ export default {
|
||||
transform: rotate( 720deg );
|
||||
}
|
||||
}
|
||||
|
||||
@media only screen and (min-width: 750px) {
|
||||
|
||||
.default {
|
||||
height: 10vh;
|
||||
width: 32vw;
|
||||
}
|
||||
|
||||
.small {
|
||||
height: 7vh;
|
||||
width: 27vw;
|
||||
}
|
||||
|
||||
.big {
|
||||
height: 12vh;
|
||||
width: 38vw;
|
||||
}
|
||||
|
||||
.bigger {
|
||||
height: 15vh;
|
||||
width: 43vw;
|
||||
}
|
||||
|
||||
.huge {
|
||||
height: 20vh;
|
||||
width: 50vw;
|
||||
}
|
||||
|
||||
.topleft {
|
||||
top: 3vh;
|
||||
left: 0.5vw;
|
||||
}
|
||||
|
||||
.topright {
|
||||
top: 3vh;
|
||||
right: 0.5vw;
|
||||
}
|
||||
|
||||
.bottomright {
|
||||
bottom: 3vh;
|
||||
right: 0.5vw;
|
||||
}
|
||||
|
||||
.bottomleft {
|
||||
top: 3vh;
|
||||
right: 0.5vw;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@media only screen and (min-width: 1500px) {
|
||||
.default {
|
||||
height: 10vh;
|
||||
width: 15vw;
|
||||
}
|
||||
|
||||
.small {
|
||||
height: 7vh;
|
||||
width: 11vw;
|
||||
}
|
||||
|
||||
.big {
|
||||
height: 12vh;
|
||||
width: 17vw;
|
||||
}
|
||||
|
||||
.bigger {
|
||||
height: 15vh;
|
||||
width: 20vw;
|
||||
}
|
||||
|
||||
.huge {
|
||||
height: 20vh;
|
||||
width: 25vw;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -19,4 +19,20 @@
|
||||
h1 {
|
||||
font-size: 400%;
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
created() {
|
||||
fetch( '/getSetupStatus' ).then( res => {
|
||||
if ( res.status === 200 ) {
|
||||
res.text().then( text => {
|
||||
if ( text !== 'true' ) {
|
||||
this.$router.push( '/' );
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
||||
}
|
||||
};
|
||||
</script>
|
||||
@@ -118,6 +118,7 @@ export default {
|
||||
if ( this.formData.email.port && this.formData.email.host && this.formData.email.user && this.formData.email.pass
|
||||
&& this.formData.dpEmail && this.formData.display && this.formData.websiteName ) {
|
||||
this.formData.mailDisplay = this.formData.display + ' <' + this.formData.dpEmail + '>';
|
||||
let progressNot = this.$refs.notification.createNotification( 'Setting up...', 20, 'progress', 'normal' );
|
||||
const options = {
|
||||
method: 'post',
|
||||
body: JSON.stringify( this.formData ),
|
||||
@@ -128,7 +129,11 @@ export default {
|
||||
};
|
||||
fetch( '/setup/saveBasicSettings', options ).then( res => {
|
||||
if ( res.status === 200 ) {
|
||||
this.continue();
|
||||
this.$refs.notification.cancelNotification( progressNot );
|
||||
this.$refs.notification.createNotification( 'Saved!', 5, 'ok', 'normal' );
|
||||
setTimeout( () => {
|
||||
this.continue();
|
||||
}, 2000 );
|
||||
} else {
|
||||
this.$refs.notification.createNotification( 'Setup key incorrect!', 5, 'error', 'normal' );
|
||||
}
|
||||
|
||||
@@ -170,6 +170,7 @@ export default {
|
||||
}
|
||||
},
|
||||
proceed () {
|
||||
let progressNot = this.$refs.notification.createNotification( 'Saving...', 20, 'progress', 'normal' );
|
||||
const options = {
|
||||
method: 'post',
|
||||
body: JSON.stringify( this.formData ),
|
||||
@@ -180,9 +181,13 @@ export default {
|
||||
};
|
||||
fetch( '/setup/saveRootAccount', options ).then( res => {
|
||||
if ( res.status === 200 ) {
|
||||
sessionStorage.setItem( 'basics', JSON.stringify( this.formData ) );
|
||||
this.backendStore.addVisitedSetupPages( 'complete', true );
|
||||
this.$router.push( 'complete' );
|
||||
this.$refs.notification.cancelNotification( progressNot );
|
||||
this.$refs.notification.createNotification( 'Saved!', 5, 'ok', 'normal' );
|
||||
setTimeout( () => {
|
||||
sessionStorage.setItem( 'basics', JSON.stringify( this.formData ) );
|
||||
this.backendStore.addVisitedSetupPages( 'complete', true );
|
||||
this.$router.push( 'complete' );
|
||||
}, 2000 );
|
||||
} else {
|
||||
this.$refs.notification.createNotification( 'Setup key incorrect!', 5, 'error', 'normal' );
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user