Updated success and failure messages and notifications display seconds
This commit is contained in:
@@ -139,6 +139,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Press enter on "Scan Serial Number" field to proceed..!')
|
->title('Press enter on "Scan Serial Number" field to proceed..!')
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(2)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -156,6 +157,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Press enter on "Remove Serial Number" field to proceed..!')
|
->title('Press enter on "Remove Serial Number" field to proceed..!')
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(2)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -172,9 +174,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
if ($locatorNo == null || $locatorNo == '')
|
if ($locatorNo == null || $locatorNo == '')
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Unknown: Locator')
|
->title('Invalid: Locator Number')
|
||||||
->body("Locator number can't be empty!")
|
->body("Locator number can't be empty!")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -187,11 +190,13 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
]);
|
]);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (strlen($locatorNo) < 7)
|
else if (strlen($locatorNo) < 7)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Locator number '$locatorNo' must be at least 7 digits.")
|
->title('Invalid: Locator Number')
|
||||||
|
->body("Locator number '$locatorNo' must be at least 7 digits.")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -212,8 +217,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
if (!$exists)
|
if (!$exists)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Locator number '$locatorNo' does not exist in the master.")
|
->title('Unknown: Locator Number')
|
||||||
|
->body("Locator number '$locatorNo' does not exist in the master.")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -241,10 +248,11 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
if ($serialLocator->count() <= 0)
|
if ($serialLocator->count() <= 0)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Serial Locator Number Not Found')
|
->title('Unknown: Serial Locator Number')
|
||||||
->body("Scanned locator number '$locatorNo' does not have any locator serial numbers to store into the pallet.<br>
|
->body("Scanned locator number '$locatorNo' does not have any locator serial numbers to store into the pallet.<br>
|
||||||
Please scan a valid stored locator number to proceed.")
|
Please scan a valid stored locator number to proceed.")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -338,15 +346,15 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
|
|
||||||
$this->records = array_merge($this->records, $newRecords);
|
$this->records = array_merge($this->records, $newRecords);
|
||||||
|
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
// $this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
// $this->form->fill([
|
||||||
'plant_id' => $plantId,
|
// 'plant_id' => $plantId,
|
||||||
'plant' => $plantId,
|
// 'plant' => $plantId,
|
||||||
'scan_locator_number' => $locatorNo,
|
// 'scan_locator_number' => $locatorNo,
|
||||||
'scan_serial_number' => null,
|
// 'scan_serial_number' => null,
|
||||||
'scan_remove_sno' => null,
|
// 'scan_remove_sno' => null,
|
||||||
'sno_quantity' => count($this->records),
|
// 'sno_quantity' => count($this->records),
|
||||||
]);
|
// ]);
|
||||||
}
|
}
|
||||||
else if ($serialNo != null && $serialNo != '')
|
else if ($serialNo != null && $serialNo != '')
|
||||||
{
|
{
|
||||||
@@ -377,10 +385,9 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Add: Locator Serial Number')
|
->title('Add: Locator Serial Number')
|
||||||
->body(
|
->body("Scanned locator serial number '$serialNo' successfully added into 'PALLET DATA' table.")
|
||||||
"Scanned locator serial number '$serialNo' successfully added into 'PALLET DATA' table."
|
|
||||||
)
|
|
||||||
->success()
|
->success()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
@@ -401,10 +408,9 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Remove: Locator Serial Number')
|
->title('Remove: Locator Serial Number')
|
||||||
->body(
|
->body("Scanned locator serial number '$removeserial' removed successfully from 'PALLET DATA' table.")
|
||||||
"Scanned locator serial number '$removeserial' removed successfully from 'PALLET DATA' table."
|
|
||||||
)
|
|
||||||
->success()
|
->success()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
|
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
@@ -430,13 +436,12 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
->where('plant_id', $plantId)
|
->where('plant_id', $plantId)
|
||||||
->where('locator_number', $locatorNo)
|
->where('locator_number', $locatorNo)
|
||||||
->where(function($query) {
|
->where(function($query) {
|
||||||
$query->whereNull('pallet_number')
|
$query->whereNull('pallet_number')->orWhere('pallet_number', '');
|
||||||
->orWhere('pallet_number', '');
|
|
||||||
})
|
})
|
||||||
->get()
|
->get()
|
||||||
->count();
|
->count();
|
||||||
|
|
||||||
$this->loadlocatorData($locatorNo, $serial, $removeSno, $plantId);
|
$this->loadlocatorData($locatorNo, '', '', $plantId);
|
||||||
|
|
||||||
$this->dispatch('close-modal', id: 'confirm-process-modal');
|
$this->dispatch('close-modal', id: 'confirm-process-modal');
|
||||||
|
|
||||||
@@ -444,6 +449,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
->title('Add: Locator Serial Numbers')
|
->title('Add: Locator Serial Numbers')
|
||||||
->body("Scanned locator number '$locatorNo' has '$serialLocator' locator serial numbers!<br>Successfully added into 'PALLET DATA' table.")
|
->body("Scanned locator number '$locatorNo' has '$serialLocator' locator serial numbers!<br>Successfully added into 'PALLET DATA' table.")
|
||||||
->success()
|
->success()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -460,8 +466,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
{
|
{
|
||||||
$plantId = $this->form->getState()['plant'];
|
$plantId = $this->form->getState()['plant'];
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Scan the new locator number to proceed..!')
|
->title('Skipped: Locator Number')
|
||||||
|
->body('Scan the new locator number to proceed..!')
|
||||||
->info()
|
->info()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -491,6 +499,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Press enter on "Scan Locator Number" field to proceed..!')
|
->title('Press enter on "Scan Locator Number" field to proceed..!')
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(2)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -508,6 +517,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Press enter on "Remove Serial Number" field to proceed..!')
|
->title('Press enter on "Remove Serial Number" field to proceed..!')
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(2)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -524,8 +534,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
if ($serialNo == '' || $serialNo == null)
|
if ($serialNo == '' || $serialNo == null)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Serial number can't be empty!")
|
->title('Invalid: Serial Number')
|
||||||
|
->body("Serial number can't be empty!")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -541,8 +553,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
else if (strlen($serialNo) < 13)
|
else if (strlen($serialNo) < 13)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Serial number '$serialNo' must be at least 13 digits.")
|
->title('Invalid: Serial Number')
|
||||||
|
->body("Serial number '$serialNo' must be at least 13 digits.")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -558,8 +572,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
else if (!ctype_alnum($serialNo))
|
else if (!ctype_alnum($serialNo))
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Serial number '$serialNo' must contain alpha-numeric values only.")
|
->title('Invalid: Serial Number')
|
||||||
|
->body("Serial number '$serialNo' must contain alpha-numeric values only.")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -585,9 +601,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
if ($serialLocator == '' || $serialLocator == null)
|
if ($serialLocator == '' || $serialLocator == null)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('UNKNOWN SERIAL NUMBER')
|
->title('Unknown: Serial Number')
|
||||||
->body("Scanned serial number: '$serialNo' doesn't exist in database!<br>Scan the valid exist locator-serial number to proceed...")
|
->body("Scanned serial number: '$serialNo' doesn't exist in pallet table.<br>Scan the valid exist locator-serial number to proceed..!")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -603,9 +620,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
elseif ($serialLocator->pallet_number != '' && $serialLocator->pallet_number != null)
|
elseif ($serialLocator->pallet_number != '' && $serialLocator->pallet_number != null)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('INVALID SERIAL NUMBER')
|
->title('Invalid: Serial Number')
|
||||||
->body("Scanned serial number: '$serialNo' already exist in pallet number '$serialLocator->pallet_number'!<br>Scan the valid locator-serial number to proceed...")
|
->body("Scanned serial number: '$serialNo' already exist in pallet number '".$serialLocator->pallet_number."'.<br>Scan the valid locator-serial number to proceed..!")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -666,6 +684,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
->title('Locator Serials Not Found')
|
->title('Locator Serials Not Found')
|
||||||
->body("Add some locator serial numbers to proceed generate pallet..!")
|
->body("Add some locator serial numbers to proceed generate pallet..!")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -731,6 +750,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
->title('Success: Pallet Generated')
|
->title('Success: Pallet Generated')
|
||||||
->body("Pallet number '$newPalletNumber' completed the master packing successfully!")
|
->body("Pallet number '$newPalletNumber' completed the master packing successfully!")
|
||||||
->success()
|
->success()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -750,6 +770,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
->title('Failed: Pallet Generated')
|
->title('Failed: Pallet Generated')
|
||||||
->body("No locator serial number records found to generate pallet..!")
|
->body("No locator serial number records found to generate pallet..!")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -807,6 +828,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Press enter on "Scan Locator Number" field to proceed..!')
|
->title('Press enter on "Scan Locator Number" field to proceed..!')
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(2)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -824,6 +846,7 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Press enter on "Scan Serial Number" field to proceed..!')
|
->title('Press enter on "Scan Serial Number" field to proceed..!')
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(2)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -837,12 +860,13 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ($removeSno == '' || $removeSno == null)
|
if ($removeSno == '' || $removeSno == null)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Serial number can't be empty!")
|
->title('Invalid: Serial Number')
|
||||||
|
->body("Serial number can't be empty!")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -858,8 +882,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
else if (strlen($removeSno) < 13)
|
else if (strlen($removeSno) < 13)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Serial number '$removeSno' must be at least 13 digits.")
|
->title('Invalid: Serial Number')
|
||||||
|
->body("Serial number '$removeSno' must be at least 13 digits.")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -875,8 +901,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
else if (!ctype_alnum($removeSno))
|
else if (!ctype_alnum($removeSno))
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title("Serial number '$removeSno' must contain alpha-numeric values only.")
|
->title('Invalid: Serial Number')
|
||||||
|
->body("Serial number '$removeSno' must contain alpha-numeric values only.")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
@@ -905,9 +933,10 @@ class PalletFromLocator extends Page implements HasForms
|
|||||||
if (!$exists)
|
if (!$exists)
|
||||||
{
|
{
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('UNKNOWN SERIAL NUMBER')
|
->title('Unknown: Serial Number')
|
||||||
->body("Scanned serial number: '$removeSno' doesn't exist in 'PALLET DATA' table!<br>Scan the valid exist locator-serial number to proceed...")
|
->body("Scanned serial number: '$removeSno' doesn't exist in 'PALLET DATA' table.<br>Scan the valid exist locator-serial number to proceed..!")
|
||||||
->danger()
|
->danger()
|
||||||
|
->seconds(3)
|
||||||
->send();
|
->send();
|
||||||
$this->dispatch('loadData', $this->records, $plantId);
|
$this->dispatch('loadData', $this->records, $plantId);
|
||||||
$this->form->fill([
|
$this->form->fill([
|
||||||
|
|||||||
Reference in New Issue
Block a user