remove mission relation from cartables
This commit is contained in:
@@ -20,16 +20,14 @@ class SupervisorService
|
||||
$query = null;
|
||||
|
||||
if ($user->hasPermissionTo('show-road-patrol-supervise-cartable')) {
|
||||
$query = RoadPatrol::query()
|
||||
->with('mission:id');
|
||||
$query = RoadPatrol::query();
|
||||
}
|
||||
elseif ($user->hasPermissionTo('show-road-patrol-supervise-cartable-province'))
|
||||
{
|
||||
throw_if(is_null($user->province_id), new ProhibitedAction('استانی برای شما در سامانه ثبت نشده است!'));
|
||||
|
||||
$query = RoadPatrol::query()
|
||||
->where('province_id', '=', $user->province_id)
|
||||
->with('mission:id');
|
||||
->where('province_id', '=', $user->province_id);
|
||||
}
|
||||
|
||||
return DataTableFacade::run(
|
||||
|
||||
Reference in New Issue
Block a user