Merge pull request #8 from witelgroup/feature/FixLastCode
Feature/fix last code
This commit is contained in:
@@ -38,8 +38,10 @@ class OperatorController extends Controller
|
||||
public function store(Mission $mission): JsonResponse
|
||||
{
|
||||
DB::transaction(function () use ($mission) {
|
||||
$user = auth()->user();
|
||||
|
||||
$road_patrol = RoadPatrol::query()->create([
|
||||
'operator_id' => $user->id,
|
||||
'status' => 0,
|
||||
'status_fa' => 'در حال بررسی',
|
||||
'province_id' => $mission->province_id,
|
||||
|
||||
@@ -12,8 +12,8 @@ class OperatorService
|
||||
public function dataTable(Request $request, $loadRelations = false)
|
||||
{
|
||||
$query = RoadPatrol::query()
|
||||
->where('operator_id', '=', auth()->user()->id)
|
||||
->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
->where('operator_id', '=', auth()->user()->id);
|
||||
// ->when($loadRelations, fn ($query) => $query->with(['rahdaran:id,name,code', 'cmmsMachines:id,machine_code,car_name,plak_number']));
|
||||
|
||||
return DataTableFacade::run(
|
||||
$query,
|
||||
|
||||
Reference in New Issue
Block a user