File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
packages/Webkul/Admin/src/DataGrids/Lead Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change @@ -11,8 +11,6 @@ class LeadDataGrid extends DataGrid
1111
1212 protected $ tabFilters = [];
1313
14- protected $ stagesMassActionOptions ;
15-
1614 protected $ redirectRow = [
1715 "id " => "id " ,
1816 "route " => "admin.leads.view " ,
@@ -161,6 +159,12 @@ public function prepareActions()
161159
162160 public function prepareMassActions ()
163161 {
162+ $ stages = [];
163+
164+ foreach (app ("\Webkul\Lead\Repositories\StageRepository " )->get (['id ' , 'name ' ])->toArray () as $ stage ) {
165+ $ stages [$ stage ['name ' ]] = $ stage ['id ' ];
166+ }
167+
164168 $ this ->addMassAction ([
165169 'type ' => 'delete ' ,
166170 'label ' => trans ('ui::app.datagrid.delete ' ),
@@ -173,7 +177,7 @@ public function prepareMassActions()
173177 'label ' => trans ('admin::app.datagrid.update_stage ' ),
174178 'action ' => route ('admin.leads.mass_update ' ),
175179 'method ' => 'PUT ' ,
176- 'options ' => $ this -> stagesMassActionOptions ,
180+ 'options ' => $ stages ,
177181 ]);
178182 }
179183}
You can’t perform that action at this time.
0 commit comments