Added serila number length check validation in panel box validation page
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 2m38s
Laravel Larastan / larastan (pull_request) Failing after 5m34s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 2m38s
Laravel Larastan / larastan (pull_request) Failing after 5m34s
This commit is contained in:
@@ -38,7 +38,7 @@ class PanelBoxValidationResource extends Resource
|
||||
{
|
||||
protected static ?string $model = PanelBoxValidation::class;
|
||||
|
||||
protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';
|
||||
protected static ?string $navigationIcon = 'heroicon-o-clipboard-document-check';
|
||||
|
||||
protected static ?string $navigationGroup = 'Panel Box';
|
||||
|
||||
@@ -581,6 +581,19 @@ class PanelBoxValidationResource extends Resource
|
||||
$itemCode = $panelBoxCode;
|
||||
$serialNumber = $panelBoxSerialNo;
|
||||
|
||||
if (strlen($serialNumber) > 28) {
|
||||
Notification::make()
|
||||
->title('Invalid Serial Number')
|
||||
->body("Serial number cannot be greater than 28 characters. Current length: " . strlen($panelBoxSerialNo))
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
$set('item_id', null);
|
||||
$set('serial_exists', false);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
$existInMasterPo = PanelGrMaster::where('document_number', $pOrder)->where('plant_id', $plantId)->first();
|
||||
|
||||
if(!$existInMasterPo){
|
||||
|
||||
Reference in New Issue
Block a user