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
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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user