Changed logic in bulk sticker prinitng
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 14s
Laravel Pint / pint (pull_request) Successful in 3m38s
Laravel Larastan / larastan (pull_request) Failing after 5m46s

This commit is contained in:
dhanabalan
2026-10-16 12:04:54 +05:30
parent b717ea701f
commit 8df617e045

View File

@@ -1079,9 +1079,13 @@ class BulkStickerPrinting extends Page implements HasForms
for ($i = 1; $i <= 8; $i++) {
$machineColumn = "sticker{$i}_machine_id";
$structureColumn = "sticker_structure{$i}_id";
if ((string) $stickerMappingMasterItem->{$machineColumn} == (string) $machineId) {
if (
(string) $stickerMappingMasterItem->{$structureColumn}
== (string) $structure->id
) {
$machineColumn = "sticker{$i}_machine_id";
$matchedMachineId = $stickerMappingMasterItem->{$machineColumn};
@@ -1089,6 +1093,19 @@ class BulkStickerPrinting extends Page implements HasForms
}
}
if (
$matchedMachineId == null ||
(string) $matchedMachineId != (string) $machineId
) {
Notification::make()
->danger()
->title('Machine Mapping Mismatch')
->body("Selected machine '{$machineId}' does not match the machine mapped to the selected sticker.")
->send();
return;
}
if ((string) $matchedMachineId != (string) $machineId) {
Notification::make()
->danger()