Merge pull request 'removed some filter logic in production temp' (#1041) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Reviewed-on: #1041
This commit was merged in pull request #1041.
This commit is contained in:
@@ -1579,24 +1579,6 @@ class ProductionTempResource extends Resource
|
|||||||
$set('machine', null);
|
$set('machine', null);
|
||||||
$set('item_id', null);
|
$set('item_id', null);
|
||||||
}),
|
}),
|
||||||
Select::make('item_id')
|
|
||||||
->label('Search by Item Code')
|
|
||||||
->nullable()
|
|
||||||
->searchable()
|
|
||||||
->reactive()
|
|
||||||
->options(function (callable $get) {
|
|
||||||
$plantId = $get('Plant');
|
|
||||||
|
|
||||||
if (empty($plantId)) {
|
|
||||||
return [];
|
|
||||||
}
|
|
||||||
|
|
||||||
return Item::whereHas('productionTemp', function ($query) use ($plantId) {
|
|
||||||
if ($plantId) {
|
|
||||||
$query->where('plant_id', $plantId);
|
|
||||||
}
|
|
||||||
})->pluck('code', 'id');
|
|
||||||
}),
|
|
||||||
TextInput::make('aufnr')
|
TextInput::make('aufnr')
|
||||||
->label('Job Number')
|
->label('Job Number')
|
||||||
->placeholder('Enter Job Number')
|
->placeholder('Enter Job Number')
|
||||||
@@ -1618,14 +1600,6 @@ class ProductionTempResource extends Resource
|
|||||||
->placeholder('Select To DateTime')
|
->placeholder('Select To DateTime')
|
||||||
->reactive()
|
->reactive()
|
||||||
->native(false),
|
->native(false),
|
||||||
Select::make('created_by')
|
|
||||||
->label('Search by Created By')
|
|
||||||
->nullable()
|
|
||||||
->searchable()
|
|
||||||
->reactive()
|
|
||||||
->options(function () {
|
|
||||||
return ProductionTemp::pluck('created_by', 'created_by');
|
|
||||||
}),
|
|
||||||
DateTimePicker::make('updated_from')
|
DateTimePicker::make('updated_from')
|
||||||
->label('Updated From')
|
->label('Updated From')
|
||||||
->placeholder('Select From DateTime')
|
->placeholder('Select From DateTime')
|
||||||
@@ -1636,14 +1610,6 @@ class ProductionTempResource extends Resource
|
|||||||
->placeholder('Select To DateTime')
|
->placeholder('Select To DateTime')
|
||||||
->reactive()
|
->reactive()
|
||||||
->native(false),
|
->native(false),
|
||||||
Select::make('updated_by')
|
|
||||||
->label('Search by Updated By')
|
|
||||||
->nullable()
|
|
||||||
->searchable()
|
|
||||||
->reactive()
|
|
||||||
->options(function () {
|
|
||||||
return ProductionTemp::pluck('updated_by', 'updated_by');
|
|
||||||
}),
|
|
||||||
])
|
])
|
||||||
->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
|
||||||
|
|||||||
Reference in New Issue
Block a user