Updated warning message if locator serial numbers not exist
This commit is contained in:
@@ -649,7 +649,25 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
// $this->Checking = session('latestPalletSerials');
|
// $this->Checking = session('latestPalletSerials');
|
||||||
$operatorName = Filament::auth()->user()->name;
|
$operatorName = Filament::auth()->user()->name;
|
||||||
|
|
||||||
$plantId = trim($plantId) ?? null;
|
if (count($this->records) <= 0)
|
||||||
|
{
|
||||||
|
Notification::make()
|
||||||
|
->title('Locator Serials Not Found')
|
||||||
|
->body("Add some locator serial numbers to proceed generate pallet..!")
|
||||||
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
|
->send();
|
||||||
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
|
$this->form->fill([
|
||||||
|
'plant_id' => $plantId,
|
||||||
|
'plant' => $plantId,
|
||||||
|
'scan_locator_number' => $locatorNo,
|
||||||
|
'scan_serial_number' => $serialNo,
|
||||||
|
'scan_remove_sno' => $removeSerial,
|
||||||
|
'sno_quantity' => 0,
|
||||||
|
]);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$year = now()->format('y');
|
$year = now()->format('y');
|
||||||
$month = now()->format('m');
|
$month = now()->format('m');
|
||||||
@@ -678,26 +696,6 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
}));
|
}));
|
||||||
JS);
|
JS);
|
||||||
|
|
||||||
if (count($this->records) <= 0)
|
|
||||||
{
|
|
||||||
Notification::make()
|
|
||||||
->title('Locator Serials Not Found')
|
|
||||||
->body("Add some locator serial numbers to proceed generate pallet..!")
|
|
||||||
->danger()
|
|
||||||
->seconds(3)
|
|
||||||
->send();
|
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
|
||||||
$this->form->fill([
|
|
||||||
'plant_id' => $plantId,
|
|
||||||
'plant' => $plantId,
|
|
||||||
'scan_locator_number' => $locatorNo,
|
|
||||||
'scan_serial_number' => $serialNo,
|
|
||||||
'scan_remove_sno' => $removeSerial,
|
|
||||||
'sno_quantity' => 0,
|
|
||||||
]);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
// $affected = PalletValidation::where('locator_number', $locatorNo)
|
// $affected = PalletValidation::where('locator_number', $locatorNo)
|
||||||
// ->where('plant_id', $plantId)
|
// ->where('plant_id', $plantId)
|
||||||
// ->whereIn('serial_number', $this->Checking)
|
// ->whereIn('serial_number', $this->Checking)
|
||||||
|
|||||||
Reference in New Issue
Block a user