zmw 2 долоо хоног өмнө
parent
commit
5a4ecddca9

+ 7 - 0
app/Admin/Controllers/Company/MembersSetmealController.php

@@ -158,6 +158,13 @@ class MembersSetmealController extends Controller
             }
             return "永久";
         });
+        $grid->model()->when(get_subsite_id() > 0, function ($query) {
+            $query->where('subsite_id', get_subsite_id());
+        })->when(Admin::user()->isRole('health'), function ($query) {
+            $query->where('is_health',1);
+        })->when(Admin::user()->isRole('ic_group'), function ($query) {
+            $query->where('is_ic',1);
+        })->orderByRaw("field(audit,2,1,3,0)")->orderBy('id', 'desc');
 
         $grid->actions(function ($actions) {
             if (Admin::user()->can('setmeal_manager_index_edit')) {