Merge pull request 'added rework logic in panel box validation page' (#953) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Reviewed-on: #953
This commit was merged in pull request #953.
This commit is contained in:
@@ -810,21 +810,21 @@ class PanelBoxValidationResource extends Resource
|
||||
|
||||
$serialExists = PanelBoxValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->first();
|
||||
|
||||
// if ($serialExists) {
|
||||
// $set('serial_exists', true);
|
||||
// } else {
|
||||
// $set('serial_exists', false);
|
||||
// }
|
||||
|
||||
if ($serialExists && ! $get('id')) {
|
||||
$set('validationError', 'Serial number already exists in panel box validation.');
|
||||
$set('sticker_master_id', null);
|
||||
$set('uom', null);
|
||||
$set('serial_number', null);
|
||||
|
||||
return;
|
||||
if ($serialExists) {
|
||||
$set('serial_exists', true);
|
||||
} else {
|
||||
$set('serial_exists', false);
|
||||
}
|
||||
|
||||
// if ($serialExists && ! $get('id')) {
|
||||
// $set('validationError', 'Serial number already exists in panel box validation.');
|
||||
// $set('sticker_master_id', null);
|
||||
// $set('uom', null);
|
||||
// $set('serial_number', null);
|
||||
|
||||
// return;
|
||||
// }
|
||||
|
||||
$set('validationError', null);
|
||||
|
||||
foreach ($serialFields as $column) {
|
||||
@@ -1003,6 +1003,8 @@ class PanelBoxValidationResource extends Resource
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
$livewire->showChecklist = false;
|
||||
|
||||
return;
|
||||
}
|
||||
$data = $get();
|
||||
@@ -1018,9 +1020,16 @@ class PanelBoxValidationResource extends Resource
|
||||
\Log::info('SETTING SHOW CHECKLIST TRUE');
|
||||
|
||||
$livewire->showChecklist = true;
|
||||
|
||||
$livewire->dispatch('close-modal');
|
||||
|
||||
return;
|
||||
}
|
||||
else{
|
||||
Notification::make()
|
||||
->title('Not Found Characteristics')
|
||||
->body('item characteristics not found')
|
||||
->danger()
|
||||
->send();
|
||||
$livewire->showChecklist = false;
|
||||
return;
|
||||
}
|
||||
// else
|
||||
|
||||
Reference in New Issue
Block a user