Merge pull request #118 from witelgroup/feature/StoreAndDeleteNoProcess

improve store controller
This commit is contained in:
Amir Ghasempoor
2025-12-28 12:37:29 +03:30
committed by GitHub

View File

@@ -96,7 +96,7 @@ class ViolationManagementController extends Controller
public function store(StoreRequest $request): JsonResponse
{
MissionViolation::query()->create([
'machine_id'=> CMMSMachine::query()->where('machine_code', '=', $request->machine_code)->id,
'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,