@@ -6,7 +6,7 @@ import EmberTableControllerMixin from 'open-event-frontend/mixins/ember-table-co
66export default class IndexController extends Controller . extend ( AdminSalesMixin , EmberTableControllerMixin ) {
77
88@or ( 'authManager.currentUser.isSuperAdmin' , 'authManager.currentUser.isAdmin' ) hasRestorePrivileges ;
9- sort_by = 'total-sales' ;
9+ // sort_by = 'total-sales';
1010sort_dir = 'DSC' ;
1111per_page = 10 ;
1212get columns ( ) {
@@ -45,14 +45,18 @@ get columns() {
4545 color : 'green' ,
4646 subcolumns : [
4747 {
48- name : this . l10n . t ( 'Tickets' ) ,
49- valuePath : 'sales.completed.ticket_count' ,
50- width : 30
48+ name : this . l10n . t ( 'Tickets' ) ,
49+ valuePath : 'completedOrderTickets' ,
50+ headerComponent : 'tables/headers/sort' ,
51+ isSortable : true ,
52+ width : 30
5153 } ,
5254 {
5355 name : this . l10n . t ( 'Sales' ) ,
54- valuePath : 'sales.completed.sales_total ' ,
56+ valuePath : 'completedOrderSales ' ,
5557 extraValuePaths : [ 'paymentCurrency' ] ,
58+ headerComponent : 'tables/headers/sort' ,
59+ isSortable : true ,
5660 cellComponent : 'ui-table/cell/admin/sales/cell-amount'
5761 }
5862 ]
@@ -63,13 +67,17 @@ get columns() {
6367 headerComponent : 'tables/headers/sort' ,
6468 subcolumns : [
6569 {
66- name : this . l10n . t ( 'Tickets' ) ,
67- valuePath : 'sales.placed.ticket_count' ,
68- width : 30
70+ name : this . l10n . t ( 'Tickets' ) ,
71+ valuePath : 'placedOrderTickets' ,
72+ headerComponent : 'tables/headers/sort' ,
73+ isSortable : true ,
74+ width : 30
6975 } ,
7076 {
7177 name : this . l10n . t ( 'Sales' ) ,
72- valuePath : 'sales.placed.sales_total' ,
78+ valuePath : 'placedOrderSales' ,
79+ headerComponent : 'tables/headers/sort' ,
80+ isSortable : true ,
7381 extraValuePaths : [ 'paymentCurrency' ] ,
7482 cellComponent : 'ui-table/cell/admin/sales/cell-amount'
7583 }
@@ -81,13 +89,17 @@ get columns() {
8189 headerComponent : 'tables/headers/sort' ,
8290 subcolumns : [
8391 {
84- name : this . l10n . t ( 'Tickets' ) ,
85- valuePath : 'sales.pending.ticket_count' ,
86- width : 30
92+ name : this . l10n . t ( 'Tickets' ) ,
93+ valuePath : 'pendingOrderTickets' ,
94+ headerComponent : 'tables/headers/sort' ,
95+ isSortable : true ,
96+ width : 30
8797 } ,
8898 {
8999 name : this . l10n . t ( 'Sales' ) ,
90- valuePath : 'sales.pending.sales_total' ,
100+ valuePath : 'pendingOrderSales' ,
101+ headerComponent : 'tables/headers/sort' ,
102+ isSortable : true ,
91103 extraValuePaths : [ 'paymentCurrency' ] ,
92104 cellComponent : 'ui-table/cell/admin/sales/cell-amount'
93105 }
0 commit comments