File tree Expand file tree Collapse file tree 2 files changed +17
-6
lines changed
components/events/view/overview
templates/components/events/view/overview Expand file tree Collapse file tree 2 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 11import Component from '@ember/component' ;
2+ import { computed } from '@ember/object' ;
23
34export default Component . extend ( {
4- classNames : [ 'ui' , 'fluid' , 'card' ]
5+ classNames : [ 'ui' , 'fluid' , 'card' ] ,
6+
7+ tickets : computed ( 'data.orderStat.tickets' , function ( ) {
8+ return this . data . orderStat . tickets . completed + this . data . orderStat . tickets . placed ;
9+ } ) ,
10+ orders : computed ( 'data.orderStat.orders' , function ( ) {
11+ return this . data . orderStat . orders . completed + this . data . orderStat . orders . placed ;
12+ } ) ,
13+ sales : computed ( 'data.orderStat.sales' , function ( ) {
14+ return this . data . orderStat . sales . completed + this . data . orderStat . sales . placed ;
15+ } )
516} ) ;
Original file line number Diff line number Diff line change 77 <tbody >
88 <tr >
99 <td >{{ t ' Total tickets sold' }} </td >
10- <td >{{ data.orderStat. tickets.completed }} </td >
10+ <td >{{ tickets }} </td >
1111 </tr >
1212 <tr >
1313 <td >{{ t ' No. of orders' }} </td >
14- <td >{{ data.orderStat. orders.completed }} </td >
14+ <td >{{ orders }} </td >
1515 </tr >
1616 <tr >
1717 <td >{{ t ' Sales (amount)' }} </td >
18- <td >{{ currency-symbol data.event.paymentCurrency }} {{ format-number data.orderStat. sales.completed }} </td >
18+ <td >{{ currency-symbol data.event.paymentCurrency }} {{ format-number sales }} </td >
1919 </tr >
2020 </tbody >
2121 </table >
3333 {{ #each data.tickets as |ticket |}}
3434 <tr >
3535 <td >{{ ticket.name }} </td >
36- <td >{{ ticket.orderStatistics.tickets.completed }} </td >
36+ <td >{{ add ticket.orderStatistics.tickets.completed ticket.orderStatistics.tickets.placed }} </td >
3737 <td >{{ ticket.quantity }} </td >
38- <td >{{ sub ticket.quantity ticket.orderStatistics.tickets.completed }} </td >
38+ <td >{{ sub ticket.quantity ( add ticket.orderStatistics.tickets.completed ticket.orderStatistics.tickets.placed ) }} </td >
3939 </tr >
4040 {{ else }}
4141 <div class =" ui basic segment" >
You can’t perform that action at this time.
0 commit comments