mirror of
https://github.com/janishutz/libreevent.git
synced 2025-11-25 13:24:24 +00:00
lots of fixes
This commit is contained in:
@@ -94,6 +94,13 @@ export default {
|
||||
},
|
||||
cartHandling () {
|
||||
for ( let ticket in this.selectedTickets ) {
|
||||
let category = '';
|
||||
const ticketSlice = ticket.slice( 0, ticket.indexOf( '_' ) );
|
||||
for ( let letter in ticketSlice ) {
|
||||
if ( !isNaN( ticketSlice[ letter ] ) ) {
|
||||
category += parseInt( ticketSlice[ letter ] );
|
||||
}
|
||||
}
|
||||
const options = {
|
||||
method: 'post',
|
||||
body: JSON.stringify( {
|
||||
@@ -102,8 +109,8 @@ export default {
|
||||
'ticketOption': ticket.substring( ticket.indexOf( '_' ) + 1 ),
|
||||
'eventID': this.event.eventID,
|
||||
'count': this.selectedTickets[ ticket ],
|
||||
'category': ticket.slice( 0, ticket.indexOf( '_' ) ),
|
||||
'name': this.event.categories[ ticket.slice( ticket.indexOf( '_' ) - 1, ticket.indexOf( '_' ) ) ].name + ' (' + this.event.ageGroups[ ticket.substring( ticket.indexOf( '_' ) + 1 ) ].name + ')',
|
||||
'category': category,
|
||||
'name': this.event.categories[ category ].name + ' (' + this.event.ageGroups[ ticket.substring( ticket.indexOf( '_' ) + 1 ) ].name + ')',
|
||||
} ),
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
|
||||
@@ -342,7 +342,7 @@
|
||||
}
|
||||
|
||||
let lowestPrice = 1000000;
|
||||
let totalSeats = parseInt( this.locations[ this.event.location ].totalSeats );
|
||||
let totalSeats = parseInt( this.locations[ this.event.location ].totalSeats ?? 0 );
|
||||
for ( let category in this.event.categories ) {
|
||||
for ( let price in this.event.categories[ category ].price ) {
|
||||
if ( this.event.categories[ category ].price[ price ] < 0.5 || ( !this.event.categories[ category ].ticketCount && this.hasSeatPlan ) ) {
|
||||
@@ -383,6 +383,7 @@
|
||||
if ( res.status === 200 ) {
|
||||
if ( action === 'deploy' ) {
|
||||
this.$refs.notification.createNotification( 'Your event has been published successfully.', 5, 'ok', 'normal' );
|
||||
fetch( '/getAPI/reloadData' ).catch( () => {} );
|
||||
this.hasLiveVersion = true;
|
||||
} else {
|
||||
this.$refs.notification.createNotification( 'Saved as draft successfully!', 5, 'ok', 'normal' );
|
||||
|
||||
Reference in New Issue
Block a user