|
@@ -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')) {
|