Merge pull request 'Added supplier number in filter' (#1019) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #1019
This commit was merged in pull request #1019.
This commit is contained in:
@@ -704,7 +704,7 @@ class PanelBoxValidationResource extends Resource
|
|||||||
|
|
||||||
Notification::make()
|
Notification::make()
|
||||||
->title('Invalid QR Format')
|
->title('Invalid QR Format')
|
||||||
->body('QR must be in either ItemCode|SerialNumber or PlantCode/ItemCode/YearMM/SerialNumber format.')
|
->body('QR must be in either PlantCode/ItemCode/SerialNumber or PlantCode/ItemCode/YearMM/SerialNumber format.')
|
||||||
->danger()
|
->danger()
|
||||||
->send();
|
->send();
|
||||||
$set('item_id', null);
|
$set('item_id', null);
|
||||||
@@ -1999,6 +1999,10 @@ class PanelBoxValidationResource extends Resource
|
|||||||
->label('Serial Number')
|
->label('Serial Number')
|
||||||
->reactive()
|
->reactive()
|
||||||
->placeholder('Enter Serial Number'),
|
->placeholder('Enter Serial Number'),
|
||||||
|
TextInput::make('panel_box_supplier')
|
||||||
|
->label('Supplier Number')
|
||||||
|
->reactive()
|
||||||
|
->placeholder('Enter Supplier Number'),
|
||||||
TextInput::make('inspection_lot_number')
|
TextInput::make('inspection_lot_number')
|
||||||
->label('Inspection Lot Number')
|
->label('Inspection Lot Number')
|
||||||
->reactive()
|
->reactive()
|
||||||
@@ -2034,7 +2038,7 @@ class PanelBoxValidationResource extends Resource
|
|||||||
])
|
])
|
||||||
->query(function ($query, array $data) {
|
->query(function ($query, array $data) {
|
||||||
// Hide all records initially if no filters are applied
|
// Hide all records initially if no filters are applied
|
||||||
if (empty($data['Plant']) && empty($data['Line']) && empty($data['Item']) && empty($data['production_order']) && empty($data['serial_number']) && empty($data['inspection_lot_number']) && empty($data['panel_box_code']) && empty($data['rework_count']) && empty($data['status']) && empty($data['created_from']) && empty($data['created_to'])) {
|
if (empty($data['Plant']) && empty($data['Line']) && empty($data['Item']) && empty($data['production_order']) && empty($data['serial_number']) && empty($data['panel_box_supplier']) && empty($data['inspection_lot_number']) && empty($data['panel_box_code']) && empty($data['rework_count']) && empty($data['status']) && empty($data['created_from']) && empty($data['created_to'])) {
|
||||||
return $query->whereRaw('1 = 0');
|
return $query->whereRaw('1 = 0');
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2070,12 +2074,16 @@ class PanelBoxValidationResource extends Resource
|
|||||||
$query->where('serial_number', 'like', '%'.$data['serial_number'].'%');
|
$query->where('serial_number', 'like', '%'.$data['serial_number'].'%');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($data['panel_box_supplier'])) {
|
||||||
|
$query->where('panel_box_supplier', $data['panel_box_supplier']);
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($data['inspection_lot_number'])) {
|
if (! empty($data['inspection_lot_number'])) {
|
||||||
$query->where('inspection_lot_number', 'like', '%'.$data['inspection_lot_number'].'%');
|
$query->where('inspection_lot_number', $data['inspection_lot_number']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($data['panel_box_code'])) {
|
if (! empty($data['panel_box_code'])) {
|
||||||
$query->where('panel_box_code', 'like', '%'.$data['panel_box_code'].'%');
|
$query->where('panel_box_code', $data['panel_box_code']);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (! empty($data['rework_count'])) {
|
if (! empty($data['rework_count'])) {
|
||||||
@@ -2129,6 +2137,10 @@ class PanelBoxValidationResource extends Resource
|
|||||||
$indicators[] = 'Serial Number: '.$data['serial_number'];
|
$indicators[] = 'Serial Number: '.$data['serial_number'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! empty($data['panel_box_supplier'])) {
|
||||||
|
$indicators[] = 'Supplier No: '.$data['panel_box_supplier'];
|
||||||
|
}
|
||||||
|
|
||||||
if (! empty($data['inspection_lot_number'])) {
|
if (! empty($data['inspection_lot_number'])) {
|
||||||
$indicators[] = 'Inspection Lot No: '.$data['inspection_lot_number'];
|
$indicators[] = 'Inspection Lot No: '.$data['inspection_lot_number'];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user