diff --git a/app/models/event.js b/app/models/event.js index 130917593e8..ac5a8752ea0 100644 --- a/app/models/event.js +++ b/app/models/event.js @@ -51,22 +51,23 @@ export default ModelBase.extend(CustomPrimaryKeyMixin, { isSessionsSpeakersEnabled : attr('boolean', { defaultValue: false }), isFeatured : attr('boolean', { defaultValue: false }), - isTaxEnabled : attr('boolean', { defaultValue: false }), - canPayByPaypal : attr('boolean', { defaultValue: false }), - canPayByStripe : attr('boolean', { defaultValue: false }), - isStripeLinked : attr('boolean'), - canPayByCheque : attr('boolean', { defaultValue: false }), - canPayByBank : attr('boolean', { defaultValue: false }), - canPayByOmise : attr('boolean', { defaultValue: false }), - canPayByAliPay : attr('boolean', { defaultValue: false }), - canPayOnsite : attr('boolean', { defaultValue: false }), - paymentCountry : attr('string'), - paymentCurrency : attr('string', { defaultValue: 'USD' }), - paypalEmail : attr('string'), - chequeDetails : attr('string'), - bankDetails : attr('string'), - onsiteDetails : attr('string'), - orderExpiryTime : attr('number', { defaultValue: 10 }), + isTaxEnabled : attr('boolean', { defaultValue: false }), + canPayByPaypal : attr('boolean', { defaultValue: false }), + canPayByStripe : attr('boolean', { defaultValue: false }), + isStripeLinked : attr('boolean'), + canPayByCheque : attr('boolean', { defaultValue: false }), + canPayByBank : attr('boolean', { defaultValue: false }), + canPayByOmise : attr('boolean', { defaultValue: false }), + canPayByAliPay : attr('boolean', { defaultValue: false }), + canPayOnsite : attr('boolean', { defaultValue: false }), + showRemainingTickets : attr('boolean', { defaultValue: false }), + paymentCountry : attr('string'), + paymentCurrency : attr('string', { defaultValue: 'USD' }), + paypalEmail : attr('string'), + chequeDetails : attr('string'), + bankDetails : attr('string'), + onsiteDetails : attr('string'), + orderExpiryTime : attr('number', { defaultValue: 10 }), schedulePublishedOn: attr('moment', { defaultValue: () => moment(0) }), @@ -157,6 +158,7 @@ export default ModelBase.extend(CustomPrimaryKeyMixin, { if (!this.locationName) { return ''; } + let splitLocations = this.locationName.split(','); if (splitLocations.length <= 3) { return this.locationName; diff --git a/app/templates/components/forms/wizard/basic-details-step.hbs b/app/templates/components/forms/wizard/basic-details-step.hbs index 68e070f3b6e..fd461d98cf1 100644 --- a/app/templates/components/forms/wizard/basic-details-step.hbs +++ b/app/templates/components/forms/wizard/basic-details-step.hbs @@ -209,6 +209,15 @@ {{/if}} --}} {{/if}} +
+
+
+ {{input type='checkbox' checked=data.event.showRemainingTickets id='show_remaining_tickets'}} + +
+
{{#if hasPaidTickets}} {{!-- Hiding discount code temporarily, till we get this feature ready to apply discount codes for events.
diff --git a/app/templates/components/public/ticket-list.hbs b/app/templates/components/public/ticket-list.hbs index 2054e73dc56..88af33bee48 100644 --- a/app/templates/components/public/ticket-list.hbs +++ b/app/templates/components/public/ticket-list.hbs @@ -17,6 +17,11 @@
{{ticket.name}}
+ {{#if showRemainingTickets}} + + {{sub ticket.quantity (add ticket.orderStatistics.tickets.completed ticket.orderStatistics.tickets.placed)}} {{t ' Tickets Remaining'}} + + {{/if}} {{#if ticket.isDescriptionVisible}} {{ticket.description}} {{/if}} diff --git a/app/templates/public/index.hbs b/app/templates/public/index.hbs index a18bb1b0f55..9e03db03cdc 100644 --- a/app/templates/public/index.hbs +++ b/app/templates/public/index.hbs @@ -18,6 +18,7 @@ isTicketingEnabled=model.event.isTicketingEnabled data=model.tickets order=model.order + showRemainingTickets=model.event.showRemainingTickets attendees=model.attendees code=code currentEventIdentifier=model.event.identifier