removed some filter logic in production temp #1041

Merged
jothi merged 1 commits from ranjith-dev into master 2026-09-18 04:25:03 +00:00

View File

@@ -1579,24 +1579,6 @@ class ProductionTempResource extends Resource
$set('machine', 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')
->label('Job Number')
->placeholder('Enter Job Number')
@@ -1618,14 +1600,6 @@ class ProductionTempResource extends Resource
->placeholder('Select To DateTime')
->reactive()
->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')
->label('Updated From')
->placeholder('Select From DateTime')
@@ -1636,14 +1610,6 @@ class ProductionTempResource extends Resource
->placeholder('Select To DateTime')
->reactive()
->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) {
// Hide all records initially if no filters are applied