removed required for work_center in test certificate page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 18s
Laravel Pint / pint (pull_request) Successful in 2m42s
Laravel Larastan / larastan (pull_request) Failing after 7m53s

This commit is contained in:
dhanabalan
2026-11-17 09:18:58 +05:30
parent abe1064044
commit 24e6d4069d

View File

@@ -86,8 +86,7 @@ class TestCertificate extends Page implements HasForms
return Machine::where('plant_id', $plantId) return Machine::where('plant_id', $plantId)
->pluck('work_center', 'id') ->pluck('work_center', 'id')
->toArray(); ->toArray();
}) }),
->required(),
TextInput::make('production_order') TextInput::make('production_order')
->label('Production Order') ->label('Production Order')
->reactive() ->reactive()
@@ -501,7 +500,6 @@ class TestCertificate extends Page implements HasForms
$prodOrderNo = trim($prodOrderNo) ?? null; $prodOrderNo = trim($prodOrderNo) ?? null;
if (!$qrcode || !preg_match('/^\d+\|\d+$/', $qrcode)) { if (!$qrcode || !preg_match('/^\d+\|\d+$/', $qrcode)) {
Notification::make() Notification::make()
->title('Invalid QR Code') ->title('Invalid QR Code')
@@ -1633,10 +1631,14 @@ class TestCertificate extends Page implements HasForms
$mappedMachineId = trim((string) $matchedMachineId); $mappedMachineId = trim((string) $matchedMachineId);
if ($mappedMachineId === '' || $mappedMachineId !== $selectedMachineId) { if ($mappedMachineId === '' || $mappedMachineId !== $selectedMachineId) {
$Mname1 = Machine::where('id', $selectedMachineId)->first();
$workC1 = $Mname1->work_center ?? null;
$Mname2 = Machine::where('id', $mappedMachineId)->first();
$workC2 = $Mname2->work_center ?? null;
Notification::make() Notification::make()
->danger() ->danger()
->title('Machine Mapping Mismatch') ->title('Machine Mapping Mismatch')
->body("Selected machine '{$selectedMachineId}' does not match the mapped machine '{$mappedMachineId}'.") ->body("Selected machine '{$workC1}' does not match the mapped machine '{$workC2}'.")
->send(); ->send();
return; return;