add column to show
This commit is contained in:
@@ -49,14 +49,14 @@ class RoadItemsProjectController extends Controller
|
|||||||
$query = null;
|
$query = null;
|
||||||
|
|
||||||
if ($user->hasPermissionTo('show-road-item-supervise-cartable')) {
|
if ($user->hasPermissionTo('show-road-item-supervise-cartable')) {
|
||||||
$query = RoadItemsProject::query()->where('is_new', 1)->with(['files', 'rahdaran:id,name,code', 'cmmsMachines:id,machine_code']);
|
$query = RoadItemsProject::query()->where('is_new', 1)->with(['files', 'rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']);
|
||||||
}
|
}
|
||||||
elseif ($user->hasPermissionTo('show-road-item-supervise-cartable-province')) {
|
elseif ($user->hasPermissionTo('show-road-item-supervise-cartable-province')) {
|
||||||
if (is_null($user->province_id)) {
|
if (is_null($user->province_id)) {
|
||||||
return $this->errorResponse('استانی برای شما در سامانه ثبت نشده است!');
|
return $this->errorResponse('استانی برای شما در سامانه ثبت نشده است!');
|
||||||
}
|
}
|
||||||
$query = RoadItemsProject::query()->where('is_new', 1)
|
$query = RoadItemsProject::query()->where('is_new', 1)
|
||||||
->with(['files', 'rahdaran:id,name,code', 'cmmsMachines:id,machine_code'])->where('province_id', auth()->user()->province_id);
|
->with(['files', 'rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number'])->where('province_id', auth()->user()->province_id);
|
||||||
}
|
}
|
||||||
|
|
||||||
$data = DataTableFacade::run(
|
$data = DataTableFacade::run(
|
||||||
@@ -152,7 +152,7 @@ class RoadItemsProjectController extends Controller
|
|||||||
$allowedFilters = $columns;
|
$allowedFilters = $columns;
|
||||||
$allowedSortings = $columns;
|
$allowedSortings = $columns;
|
||||||
|
|
||||||
$query = RoadItemsProject::with(['files', 'rahdaran:id,name,code', 'cmmsMachines:id,machine_code'])
|
$query = RoadItemsProject::with(['files', 'rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number'])
|
||||||
->where('is_new', 1)
|
->where('is_new', 1)
|
||||||
->where('user_id', auth()->user()->id);
|
->where('user_id', auth()->user()->id);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user