Merge pull request 'removed required for work_center in test certificate page' (#1435) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 16s

Reviewed-on: #1435
This commit was merged in pull request #1435.
This commit is contained in:
2026-11-17 03:49:36 +00:00

View File

@@ -86,8 +86,7 @@ class TestCertificate extends Page implements HasForms
return Machine::where('plant_id', $plantId)
->pluck('work_center', 'id')
->toArray();
})
->required(),
}),
TextInput::make('production_order')
->label('Production Order')
->reactive()
@@ -501,7 +500,6 @@ class TestCertificate extends Page implements HasForms
$prodOrderNo = trim($prodOrderNo) ?? null;
if (!$qrcode || !preg_match('/^\d+\|\d+$/', $qrcode)) {
Notification::make()
->title('Invalid QR Code')
@@ -1633,10 +1631,14 @@ class TestCertificate extends Page implements HasForms
$mappedMachineId = trim((string) $matchedMachineId);
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()
->danger()
->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();
return;