Skip to content
Permalink
Browse files

Added support for donation tickets (#3069)

updated ticket input list

Made the ticket price variable
  • Loading branch information...
mrsaicharan1 authored and mariobehling committed Jun 20, 2019
1 parent 1a6bac6 commit 128cfedc1d8943c48ebf37567bfaff1d996333ad
@@ -21,6 +21,8 @@ export default ModelBase.extend({
salesEndsAt : attr('moment', { defaultValue: () => moment().add(10, 'days').startOf('day') }),
minOrder : attr('number', { defaultValue: 1 }),
maxOrder : attr('number', { defaultValue: 10 }),
minPrice : attr('number'),
maxPrice : attr('number'),
isFeeAbsorbed : attr('boolean', { defaultValue: true }),
position : attr('number'),

@@ -162,10 +162,10 @@
<div class="six wide column">
<label class="required">{{t 'Ticket Name'}}</label>
</div>
<div class="column">
<div class="two wide column">
<label class="required">{{t 'Price'}}</label>
</div>
<div class="column">
<div class="four wide column">
<label class="required">{{t 'Quantity'}}</label>
</div>
<div class="column">
@@ -209,6 +209,18 @@
</div>
{{/if}} --}}
</div>
<button type="button" class="ui blue small button" {{action 'addTicket' 'donation' data.event.tickets.length}}>
<i class="large icons basic-details">
<i class="heart icon"></i>
<i class="inverted corner add icon"></i>
</i>
{{t 'Donation Ticket'}}
</button>
{{else}}
<div class="field">
<label for="ticket_url">{{t 'Ticket URL'}}</label>
{{widgets/forms/link-input inputId='ticket_url' segmentedLink=data.event.segmentedTicketUrl}}
</div>
{{/if}}
{{#if hasPaidTickets}}
{{!-- Hiding discount code temporarily, till we get this feature ready to apply discount codes for events.
@@ -22,17 +22,23 @@
{{/if}}
</td>
<td>{{moment-format ticket.salesEndsAt 'ddd, DD MMMM YY, h:mm A'}}</td>
{{#if ticket.discount}}
<td>
<div id="{{ticket.id}}_price" class="strike text">
{{currency-symbol eventCurrency}} {{format-number ticket.price}}
</div>
<div id="{{ticket.id}}_discount">
{{currency-symbol eventCurrency}} {{format-number (sub ticket.price ticket.discount)}}
</div>
</td>
{{#if (eq ticket.type 'donation') }}
<div class="three wide column">
<td id="{{ticket.id}}_price">{{input type='number' value=ticket.price}}</td>
</div>
{{else}}
<td id="{{ticket.id}}_price">{{currency-symbol eventCurrency}} {{format-number ticket.price}}</td>
{{#if ticket.discount}}
<td>
<div id="{{ticket.id}}_price" class="strike text">
{{currency-symbol eventCurrency}} {{format-number ticket.price}}
</div>
<div id="{{ticket.id}}_discount">
{{currency-symbol eventCurrency}} {{format-number (sub ticket.price ticket.discount)}}
</div>
</td>
{{else}}
<td id="{{ticket.id}}_price">{{currency-symbol eventCurrency}} {{format-number ticket.price}}</td>
{{/if}}
{{/if}}
<td>
<div class="field">
@@ -4,22 +4,41 @@
{{input type='text' name='ticket_name' placeholder=(t 'Ticket Name') value=ticket.name}}
</div>
</div>
<div class="column">
{{#if (eq ticket.type 'paid')}}
<div class="two wide column">
{{#if (eq ticket.type 'paid') }}
<div class="field">
{{input type='number' name='ticket_price' placeholder=(t 'Price') value=ticket.price min=1}}
</div>
{{else}}
<span class="text muted ticket-input">
{{t 'This is a'}} {{ticket.type}} {{t 'Ticket'}}
</span>
{{else if (eq ticket.type 'donation')}}
<div class="two fields">
<div class="field">
{{input type='number' name='min_price' placeholder=(t 'Min') value=ticket.minOrder}}
</div>
<div class="field">
{{input type='number' name='max_price' placeholder=(t 'Max') value=ticket.maxOrder}}
</div>
</div>
{{else if (eq ticket.type 'free')}}
<div class="four wide column">
<span class="text muted ticket-input">
{{t 'This is a free Ticket'}}
</span>
</div>
{{/if}}
</div>
<div class="column">
<div class="field">
{{input type='number' name='ticket_quantity' placeholder=(t 'Quantity') value=ticket.quantity min=1}}
{{#if (eq ticket.type 'donation')}}
<div class="four wide column">
<span class="text muted ticket-input">
{{t 'This is a Donation Ticket'}}
</span>
</div>
</div>
{{else}}
<div class="four wide column">
<div class="field">
{{input type='number' name='ticket_quantity' placeholder=(t 'Quantity') value=ticket.maxOrder min=1}}
</div>
</div>
{{/if}}
<div class="column {{unless device.isLargeMonitor 'less right padding'}}">
<div class="field">
<div class="ui icon buttons">

0 comments on commit 128cfed

Please sign in to comment.
You can’t perform that action at this time.