Merge pull request #119 from witelgroup/feature/bugFix

change relation
This commit is contained in:
Amir Ghasempoor
2025-12-28 12:37:15 +03:30
committed by GitHub
4 changed files with 4 additions and 4 deletions

View File

@@ -226,6 +226,6 @@ class RoadMaintenanceStationController extends Controller
public function giveListToFms(): JsonResponse
{
return $this->successResponse(RahdariPoint::all(['id', 'name', 'lat', 'lng', 'area']));
return $this->successResponse(RahdariPoint::all(['id', 'province_id', 'province_name', 'city_id', 'city_name', 'name', 'lat', 'lng', 'area']));
}
}

View File

@@ -17,8 +17,8 @@ class MissionViolation extends Model
return $this->belongsTo(Mission::class);
}
public function machine(): HasOne
public function machine(): BelongsTo
{
return $this->hasOne(CMMSMachine::class);
return $this->belongsTo(CMMSMachine::class, 'machine_id');
}
}

View File

@@ -46,6 +46,7 @@ class DailyMovingMachinesService
$inputData = $this->makeInputParameters();
return Http::withBody($inputData)
->timeout(120)
->throw()
->withoutVerifying()
->post($this->url)

View File

@@ -30,7 +30,6 @@ class DailyMoveMachineService
$request,
allowedFilters: ['*'],
allowedSortings: ['*'],
allowedSelects: ['id', 'mission_id', 'machine_code', 'request_date', 'type', 'exit_time', 'enter_time', 'status']
);
}
}