diff --git a/app/Services/Cartables/RoadItemTableService.php b/app/Services/Cartables/RoadItemTableService.php index 0b64e741..2638e5c5 100644 --- a/app/Services/Cartables/RoadItemTableService.php +++ b/app/Services/Cartables/RoadItemTableService.php @@ -53,7 +53,7 @@ class RoadItemTableService $allowedSortings = ['*']; $query = RoadItemsProject::query() - ->select(['id', 'supervisor_description', 'item', 'item_fa', 'sub_item', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng', + ->select(['id', 'province_fa', 'edarat_name', 'supervisor_description', 'item', 'item_fa', 'sub_item', 'sub_item_fa', 'sub_item_data', 'unit_fa', 'start_lat', 'start_lng', 'end_lat', 'end_lng', 'activity_date_time', 'created_at', 'status_fa', 'status']) ->where('is_new', 1) ->where('user_id', auth()->user()->id) diff --git a/app/Services/DataTable/DataTableService.php b/app/Services/DataTable/DataTableService.php index 442f6e48..5755ad1d 100644 --- a/app/Services/DataTable/DataTableService.php +++ b/app/Services/DataTable/DataTableService.php @@ -80,6 +80,7 @@ class DataTableService $query = $this->applySelect($query, $this->allowedSelects); $query = $this->includeRelationsInQuery($query, $this->allowedRelations); + $query = $this->applyGroupBy($query, $this->allowedGroupBy); $this->totalRowCount = $query->count(); @@ -96,8 +97,6 @@ class DataTableService $query = (new ApplySort($query, $sort))->apply(); } - $query = $this->applyGroupBy($query, $this->allowedGroupBy); - return $query; } diff --git a/resources/views/v3/Reports/RoadItems/OperatorCartableReport.blade.php b/resources/views/v3/Reports/RoadItems/OperatorCartableReport.blade.php index 3894defd..76431163 100644 --- a/resources/views/v3/Reports/RoadItems/OperatorCartableReport.blade.php +++ b/resources/views/v3/Reports/RoadItems/OperatorCartableReport.blade.php @@ -97,7 +97,7 @@