This commit is contained in:
2026-06-10 14:37:36 +03:30
parent eeff2861e5
commit 5d2a6d045b
12 changed files with 122 additions and 31 deletions

View File

@@ -61,6 +61,7 @@ class ViolationManagementController extends Controller
'edare_shahri_name' => $user->edarate_shahri_name ?? null,
'zone' => $zone,
'zone_fa' => MissionZones::name($zone),
'area' => $request->area,
'type' => $type,
'type_fa' => MissionTypes::name($type),
'start_date' => $request->start_date,
@@ -103,7 +104,7 @@ class ViolationManagementController extends Controller
'machine_id'=> CMMSMachine::query()->where('machine_code', '=', $request->machine_code)->value('id'),
'machine_code'=> $request->machine_code,
'type'=> MissionViolationType::KHOROJ_BEDONE_MOGAVEZ->value,
'status' => MissionViolationStatus::BEDON_EGHDAM->value,
'status' => MissionViolationStatus::SABT_SHODE->value,
'request_date' => now(),
'km' => $request->km,
'gps' => 0,
@@ -111,6 +112,9 @@ class ViolationManagementController extends Controller
'province_name' => $user->province_fa,
'city_id' => $user->city_id,
'city_name' => $user->city_fa,
'station_id' => $user->station_id,
'station_name' => RahdariPoint::query()->find($user->station_id)->name,
'exit_time' => $request->exit_time,
]);
return $this->successResponse();
@@ -125,7 +129,6 @@ class ViolationManagementController extends Controller
{
$violation->update([
'enter_time' => $request->enter_time,
'exit_time' => $request->exit_time,
]);
return $this->successResponse();