File tree Expand file tree Collapse file tree 4 files changed +30
-20
lines changed Expand file tree Collapse file tree 4 files changed +30
-20
lines changed Original file line number Diff line number Diff line change
1
+ import classic from 'ember-classic-decorator' ;
2
+ import Component from '@ember/component' ;
3
+
4
+ @classic
5
+ export default class TicketPrice extends Component { }
Original file line number Diff line number Diff line change 89
89
</div >
90
90
</td >
91
91
<td >
92
- {{ #if ( eq ticket.type ' free ' ) }}
93
- {{ t " Free " }}
94
- {{ else }}
95
- {{ currency-symbol this.eventCurrency }} {{ format-money ticket.price }}
96
- {{ /if }}
92
+ < Orders::TicketPrice
93
+ @ ticket-type = {{ ticket.type }}
94
+ @ display-symbol = {{ currency-symbol this.eventCurrency }}
95
+ @ display-price = {{ format-money ticket.price }}
96
+ />
97
97
</td >
98
98
{{ #if this.data.discountCode }}
99
99
<td >{{ currency-symbol this.eventCurrency }} {{ format-money ticket.discount }} </td >
113
113
</td >
114
114
{{ /if }}
115
115
<td >
116
- {{ #if ( eq ticket.type ' free ' ) }}
117
- {{ t " Free " }}
118
- {{ else }}
119
- {{ currency-symbol this.eventCurrency }} {{ format-money (mult (sub ticket.price ticket.discount ) (ticket-attendees this.data.attendees ticket.attendees ))}}
120
- {{ /if }}
116
+ < Orders::TicketPrice
117
+ @ ticket-type = {{ ticket.type }}
118
+ @ display-symbol = {{ currency-symbol this.eventCurrency }}
119
+ @ display-price = {{ format-money (mult (sub ticket.price ticket.discount ) (ticket-attendees this.data.attendees ticket.attendees ))}}
120
+ />
121
121
</td >
122
122
{{ /if }}
123
123
Original file line number Diff line number Diff line change
1
+ {{ #if (eq ticket-type ' free' )}}
2
+ {{ t " Free" }}
3
+ {{ else }}
4
+ {{ display-symbol }} {{ display-price }}
5
+ {{ /if }}
Original file line number Diff line number Diff line change 49
49
</div >
50
50
{{ else }}
51
51
<div class =" {{ if ticket.discount ' strike text' }} " >
52
- {{ #if ( eq ticket.type ' free ' ) }}
53
- {{ t " Free " }}
54
- {{ else }}
55
- {{ currency-symbol this.eventCurrency }} {{ format-money ticket.price }}
56
- {{ /if }}
52
+ < Orders::TicketPrice
53
+ @ ticket-type = {{ ticket.type }}
54
+ @ display-symbol = {{ currency-symbol this.eventCurrency }}
55
+ @ display-price = {{ format-money ticket.price }}
56
+ />
57
57
</div >
58
58
{{ #if ticket.discount }}
59
59
<div >
100
100
</div >
101
101
</td >
102
102
<td id =' {{ ticket.id }} _subtotal' class =" ui right aligned" >
103
- {{ #if ( eq ticket.type ' free ' ) }}
104
- {{ t " Free " }}
105
- {{ else }}
106
- {{ currency-symbol this.eventCurrency }} {{ format-money ticket.subTotal }}
107
- {{ /if }}
103
+ < Orders::TicketPrice
104
+ @ ticket-type = {{ ticket.type }}
105
+ @ display-symbol = {{ currency-symbol this.eventCurrency }}
106
+ @ display-price = {{ format-money ticket.subTotal }}
107
+ />
108
108
</td >
109
109
</tr >
110
110
{{ /unless }}
You can’t perform that action at this time.
0 commit comments