@@ -63,57 +63,62 @@ export default class OperationsOrdersIndexController extends Controller {
6363 @tracked without_driver ;
6464 @tracked status ;
6565 @tracked type ;
66+ @tracked orderConfig ;
6667 @tracked bulkSearchValue = '' ;
6768 @tracked bulk_query = '' ;
6869 @tracked layout = 'map' ;
6970
7071 /** action buttons */
71- @tracked actionButtons = [
72- {
73- icon : 'refresh' ,
74- onClick : this . orderActions . refresh ,
75- helpText : this . intl . t ( 'common.refresh' ) ,
76- } ,
77- {
78- text : this . intl . t ( 'common.new' ) ,
79- type : 'primary' ,
80- icon : 'plus' ,
81- onClick : this . orderActions . transition . create ,
82- } ,
83- {
84- text : this . intl . t ( 'common.export' ) ,
85- icon : 'long-arrow-up' ,
86- iconClass : 'rotate-icon-45' ,
87- wrapperClass : 'hidden md:flex' ,
88- onClick : this . orderActions . export ,
89- } ,
90- ] ;
72+ get actionButtons ( ) {
73+ return [
74+ {
75+ icon : 'refresh' ,
76+ onClick : this . orderActions . refresh ,
77+ helpText : this . intl . t ( 'common.refresh' ) ,
78+ } ,
79+ {
80+ text : this . intl . t ( 'common.new' ) ,
81+ type : 'primary' ,
82+ icon : 'plus' ,
83+ onClick : this . orderActions . transition . create ,
84+ } ,
85+ {
86+ text : this . intl . t ( 'common.export' ) ,
87+ icon : 'long-arrow-up' ,
88+ iconClass : 'rotate-icon-45' ,
89+ wrapperClass : 'hidden md:flex' ,
90+ onClick : this . orderActions . export ,
91+ } ,
92+ ] ;
93+ }
9194
9295 /** bulk actions */
93- @tracked bulkActions = [
94- {
95- label : this . intl . t ( 'common.cancel-resource' , { resource : this . intl . t ( 'resource.orders' ) } ) ,
96- icon : 'ban' ,
97- fn : this . orderActions . bulkCancel ,
98- } ,
99- {
100- label : this . intl . t ( 'common.delete-resource' , { resource : this . intl . t ( 'resource.orders' ) } ) ,
101- icon : 'trash' ,
102- class : 'text-red-500' ,
103- fn : this . orderActions . bulkDelete ,
104- } ,
105- { separator : true } ,
106- {
107- label : this . intl . t ( 'common.dispatch-orders' ) ,
108- icon : 'rocket' ,
109- fn : this . orderActions . bulkDispatch ,
110- } ,
111- {
112- label : this . intl . t ( 'common.assign-driver' ) ,
113- icon : 'user-plus' ,
114- fn : this . orderActions . bulkAssignDriver ,
115- } ,
116- ] ;
96+ get bulkActions ( ) {
97+ return [
98+ {
99+ label : this . intl . t ( 'common.cancel-resource' , { resource : this . intl . t ( 'resource.orders' ) } ) ,
100+ icon : 'ban' ,
101+ fn : this . orderActions . bulkCancel ,
102+ } ,
103+ {
104+ label : this . intl . t ( 'common.delete-resource' , { resource : this . intl . t ( 'resource.orders' ) } ) ,
105+ icon : 'trash' ,
106+ class : 'text-red-500' ,
107+ fn : this . orderActions . bulkDelete ,
108+ } ,
109+ { separator : true } ,
110+ {
111+ label : this . intl . t ( 'common.dispatch-orders' ) ,
112+ icon : 'rocket' ,
113+ fn : this . orderActions . bulkDispatch ,
114+ } ,
115+ {
116+ label : this . intl . t ( 'common.assign-driver' ) ,
117+ icon : 'user-plus' ,
118+ fn : this . orderActions . bulkAssignDriver ,
119+ } ,
120+ ] ;
121+ }
117122
118123 /** columns */
119124 get columns ( ) {
@@ -366,7 +371,7 @@ export default class OperationsOrdersIndexController extends Controller {
366371 ddButtonText : false ,
367372 ddButtonIcon : 'ellipsis-h' ,
368373 ddButtonIconPrefix : 'fas' ,
369- ddMenuLabel : this . intl . t ( 'common.resource-actions' , { resource : this . intl . t ( 'resource.Order ' ) } ) ,
374+ ddMenuLabel : this . intl . t ( 'common.resource-actions' , { resource : this . intl . t ( 'resource.order ' ) } ) ,
370375 cellClassNames : 'overflow-visible' ,
371376 wrapperClass : 'flex items-center justify-end mx-2' ,
372377 width : '12%' ,
0 commit comments