Refactored validations and design in resource file
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s

This commit is contained in:
dhanabalan
2026-10-03 17:59:26 +05:30
parent c410f37d3d
commit 693a97cf78

View File

@@ -11,6 +11,7 @@ use App\Models\Line;
use App\Models\Machine; use App\Models\Machine;
use App\Models\MotorTestingMaster; use App\Models\MotorTestingMaster;
use App\Models\Plant; use App\Models\Plant;
use Closure;
use Filament\Facades\Filament; use Filament\Facades\Filament;
use Filament\Forms; use Filament\Forms;
use Filament\Forms\Components\DateTimePicker; use Filament\Forms\Components\DateTimePicker;
@@ -26,6 +27,7 @@ use Filament\Tables\Filters\Filter;
use Filament\Tables\Table; use Filament\Tables\Table;
use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\SoftDeletingScope; use Illuminate\Database\Eloquent\SoftDeletingScope;
use Illuminate\Support\Str;
class BeforeTestReadingResource extends Resource class BeforeTestReadingResource extends Resource
{ {
@@ -47,33 +49,29 @@ class BeforeTestReadingResource extends Resource
->label('Plant Name') ->label('Plant Name')
->relationship('plant', 'name') ->relationship('plant', 'name')
->columnSpan(1) // (['default' => 1, 'sm' => 2]) ->columnSpan(1) // (['default' => 1, 'sm' => 2])
->searchable()
->required()
->reactive() ->reactive()
->searchable()
->options(function (callable $get) { ->options(function (callable $get) {
$userHas = Filament::auth()->user()->plant_id; $userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray(); return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
}) })
->default(function () {
return optional(BeforeTestReading::latest()->first())->plant_id ?? null;
})
->disabled(fn (Get $get) => ! empty($get('id'))) ->disabled(fn (Get $get) => ! empty($get('id')))
->default(function () {
$userHas = Filament::auth()->user()->plant_id;
return ($userHas && strlen($userHas) > 0) ? $userHas : optional(BeforeTestReading::latest()->first())->plant_id ?? null;
})
->afterStateUpdated(function ($state, callable $set, callable $get) { ->afterStateUpdated(function ($state, callable $set, callable $get) {
$plantId = $get('plant_id'); $plantId = $get('plant_id');
if (! $plantId) { if (! $plantId) {
$set('line_id', null);
$set('motor_testing_master_id', null);
$set('machine_id', null);
$set('tPrError', 'Please select a plant first.'); $set('tPrError', 'Please select a plant first.');
return;
} else { } else {
$set('line_id', null);
$set('motor_testing_master_id', null);
$set('machine_id', null);
$set('tPrError', null); $set('tPrError', null);
} }
$set('line_id', null);
$set('motor_testing_master_id', null);
$set('machine_id', null);
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}) })
@@ -81,10 +79,12 @@ class BeforeTestReadingResource extends Resource
'class' => $get('tPrError') ? 'border-red-500' : '', 'class' => $get('tPrError') ? 'border-red-500' : '',
]) ])
->hint(fn ($get) => $get('tPrError') ? $get('tPrError') : null) ->hint(fn ($get) => $get('tPrError') ? $get('tPrError') : null)
->hintColor('danger'), ->hintColor('danger')
->required(),
Forms\Components\Select::make('line_id') Forms\Components\Select::make('line_id')
->label('Line Name') ->label('Line Name')
// ->relationship('line', 'name') // ->relationship('line', 'name')
->columnSpan(1)
->searchable() ->searchable()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('plant_id'); $plantId = $get('plant_id');
@@ -92,24 +92,29 @@ class BeforeTestReadingResource extends Resource
return []; return [];
} }
return Line::where('plant_id', $plantId) return Line::where('plant_id', $plantId)->pluck('name', 'id')->toArray();
->pluck('name', 'id')
->toArray();
})
->default(function () {
return optional(BeforeTestReading::latest()->first())->line_id ?? null;
}) })
->disabled(fn (Get $get) => ! empty($get('id'))) ->disabled(fn (Get $get) => ! empty($get('id')))
->required() ->default(function (callable $get) {
$plantId = $get('plant_id');
if (empty($plantId)) {
return null;
}
return BeforeTestReading::where('plant_id', $plantId)->latest()->first()->line_id ?? null;
})
->reactive() ->reactive()
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$set('motor_testing_master_id', null); $set('motor_testing_master_id', null);
$set('machine_id', null); $set('machine_id', null);
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), })
->required(),
Forms\Components\Select::make('machine_id') Forms\Components\Select::make('machine_id')
->label('Work Center') ->label('Work Center')
// ->relationship('machine', 'work_center') // ->relationship('machine', 'work_center')
->columnSpan(1)
->reactive()
->searchable() ->searchable()
->options(function (callable $get) { ->options(function (callable $get) {
$lineId = $get('line_id'); $lineId = $get('line_id');
@@ -118,34 +123,39 @@ class BeforeTestReadingResource extends Resource
} }
// Only show machines for the selected line // Only show machines for the selected line
return Machine::where('line_id', $lineId) return Machine::where('line_id', $lineId)->pluck('work_center', 'id')->toArray();
->pluck('work_center', 'id')
->toArray();
})
->default(function () {
return optional(BeforeTestReading::latest()->first())->machine_id ?? null;
}) })
->disabled(fn (Get $get) => ! empty($get('id'))) ->disabled(fn (Get $get) => ! empty($get('id')))
->required() ->default(function (callable $get) {
->reactive() $plantId = $get('plant_id');
if (empty($plantId)) {
return null;
}
return BeforeTestReading::where('plant_id', $plantId)->latest()->first()->machine_id ?? null;
})
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), })
->required(),
Forms\Components\Select::make('motor_testing_master_id') Forms\Components\Select::make('motor_testing_master_id')
->label('Item Code') ->label('Item Code')
// ->relationship('motorTestingMaster', 'item.code') // ->relationship('motorTestingMaster', 'item.code')
// ->options(function (callable $get) { ->columnSpan(1)
// $plantId = $get('plant_id'); // ->options(function (callable $get) {
// if (!$plantId) { // $plantId = $get('plant_id');
// return []; // if (!$plantId) {
// } // return [];
// return MotorTestingMaster::with('item') // }
// ->where('plant_id', $plantId) // return MotorTestingMaster::with('item')
// ->get() // ->where('plant_id', $plantId)
// //->filter(fn ($mtm) => $mtm->item) // ->get()
// ->pluck('item.code', 'id') // //->filter(fn ($mtm) => $mtm->item)
// ->toArray(); // ->pluck('item.code', 'id')
// }) // ->toArray();
// })
->reactive()
->searchable()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('plant_id'); $plantId = $get('plant_id');
if (! $plantId) { if (! $plantId) {
@@ -159,42 +169,83 @@ class BeforeTestReadingResource extends Resource
->pluck('items.code', 'motor_testing_masters.id') ->pluck('items.code', 'motor_testing_masters.id')
->toArray(); ->toArray();
}) })
// ->getOptionLabelUsing(fn ($value) => ->disabled(fn (Get $get) => ! empty($get('id')))
// MotorTestingMaster::with('item')->find($value)?->item?->code // ->getOptionLabelUsing(fn ($value) =>
// ) // MotorTestingMaster::with('item')->find($value)?->item?->code
->required() // )
->searchable()
->reactive()
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), })
->required(),
Forms\Components\TextInput::make('serial_number') Forms\Components\TextInput::make('serial_number')
->label('Serial Number') ->label('Serial Number')
->required() ->columnSpan(1)
->reactive()
->readOnly(fn (Get $get) => $get('id'))
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), })
->rule(function (callable $get) {
return function (string $attribute, $value, Closure $fail) use ($get) {
$plantId = $get('plant_id');
$lineId = $get('line_id');
$machineId = $get('machine_id');
$itemId = $get('motor_testing_master_id');
$serialNumber = trim($value);
// $currentId = $get('id'); // current editing record id
if (! $plantId || ! $lineId || ! $machineId || ! $itemId) {
return;
}
if ($serialNumber == null || $serialNumber == '' || ! $serialNumber) {
$fail("Serial number can't be empty!");
} elseif (Str::length($serialNumber) < 9) {
$fail('Serial number should contain minimum 9 digits!');
} elseif (! ctype_alnum($serialNumber)) {
$fail('Serial number should contain only alpha-numeric values!');
} elseif (! preg_match('/^[1-9][a-zA-Z0-9]{8,}$/', $serialNumber)) {
$fail("Serial number should not begin with '0' or letter!");
}
};
})
->required(),
Forms\Components\TextInput::make('before_fr_res_ry') Forms\Components\TextInput::make('before_fr_res_ry')
->label('Before FR Resistance RY') ->label('Before FR Resistance RY')
->columnSpan(1)
->reactive()
->readOnly(fn (Get $get) => $get('id'))
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), }),
Forms\Components\TextInput::make('before_fr_res_yb') Forms\Components\TextInput::make('before_fr_res_yb')
->label('Before FR Resistance YB') ->label('Before FR Resistance YB')
->columnSpan(1)
->reactive()
->readOnly(fn (Get $get) => $get('id'))
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), }),
Forms\Components\TextInput::make('before_fr_res_br') Forms\Components\TextInput::make('before_fr_res_br')
->label('Before FR Resistance BR') ->label('Before FR Resistance BR')
->columnSpan(1)
->reactive()
->readOnly(fn (Get $get) => $get('id'))
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), }),
Forms\Components\TextInput::make('before_fr_ir') Forms\Components\TextInput::make('before_fr_ir')
->label('Before FR IR') ->label('Before FR IR')
->columnSpan(1)
->reactive()
->readOnly(fn (Get $get) => $get('id'))
->afterStateUpdated(function (callable $set, callable $get, ?string $state) { ->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
$set('updated_by', Filament::auth()->user()?->name); $set('updated_by', Filament::auth()->user()?->name);
}), }),
Forms\Components\TextInput::make('tested_by') Forms\Components\TextInput::make('tested_by')
->label('Tested By')
->columnSpan(1)
->default(fn () => Filament::auth()->user()?->name) ->default(fn () => Filament::auth()->user()?->name)
->readOnly() ->readOnly()
->required(), ->required(),
@@ -232,6 +283,9 @@ class BeforeTestReadingResource extends Resource
Tables\Columns\TextColumn::make('line.name') Tables\Columns\TextColumn::make('line.name')
->label('Line Name') ->label('Line Name')
->alignCenter(), ->alignCenter(),
Tables\Columns\TextColumn::make('machine.workGroupMaster.name')
->label('Group Work Center')
->alignCenter(),
Tables\Columns\TextColumn::make('machine.work_center') Tables\Columns\TextColumn::make('machine.work_center')
->label('Work Center') ->label('Work Center')
->alignCenter(), ->alignCenter(),
@@ -244,9 +298,20 @@ class BeforeTestReadingResource extends Resource
Tables\Columns\TextColumn::make('motorTestingMaster.item.description') Tables\Columns\TextColumn::make('motorTestingMaster.item.description')
->label('Model') ->label('Model')
->alignCenter(), ->alignCenter(),
Tables\Columns\TextColumn::make('motorTestingMaster.item.category')
->label('Category')
->default('-')
->alignCenter()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('motorTestingMaster.item.uom')
->label('Unit of Measure')
->default('-')
->alignCenter()
->toggleable(isToggledHiddenByDefault: true),
Tables\Columns\TextColumn::make('serial_number') Tables\Columns\TextColumn::make('serial_number')
->label('Serial Number') ->label('Serial Number')
->alignCenter() ->alignCenter()
->searchable()
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('motorTestingMaster.kw') Tables\Columns\TextColumn::make('motorTestingMaster.kw')
->label('KW') ->label('KW')
@@ -288,8 +353,7 @@ class BeforeTestReadingResource extends Resource
->sortable(), ->sortable(),
Tables\Columns\TextColumn::make('tested_by') Tables\Columns\TextColumn::make('tested_by')
->label('Tested By') ->label('Tested By')
->alignCenter() ->alignCenter(),
->numeric(),
Tables\Columns\TextColumn::make('updated_at') Tables\Columns\TextColumn::make('updated_at')
->label('Updated At') ->label('Updated At')
->alignCenter() ->alignCenter()
@@ -297,8 +361,7 @@ class BeforeTestReadingResource extends Resource
->dateTime(), ->dateTime(),
Tables\Columns\TextColumn::make('updated_by') Tables\Columns\TextColumn::make('updated_by')
->label('Updated By') ->label('Updated By')
->alignCenter() ->alignCenter(),
->numeric(),
Tables\Columns\TextColumn::make('deleted_at') Tables\Columns\TextColumn::make('deleted_at')
->label('Deleted At') ->label('Deleted At')
->alignCenter() ->alignCenter()
@@ -306,6 +369,7 @@ class BeforeTestReadingResource extends Resource
->dateTime() ->dateTime()
->toggleable(isToggledHiddenByDefault: true), ->toggleable(isToggledHiddenByDefault: true),
]) ])
->searchPlaceholder('Search by Serial Number')
->filters([ ->filters([
Tables\Filters\TrashedFilter::make(), Tables\Filters\TrashedFilter::make(),
Filter::make('advanced_filters') Filter::make('advanced_filters')
@@ -313,8 +377,9 @@ class BeforeTestReadingResource extends Resource
->form([ ->form([
Select::make('Plant') Select::make('Plant')
->label('Search by Plant Name') ->label('Search by Plant Name')
->searchable()
->nullable() ->nullable()
->searchable()
->reactive()
->options(function () { ->options(function () {
// return Plant::pluck('name', 'id'); // return Plant::pluck('name', 'id');
$userHas = Filament::auth()->user()->plant_id; $userHas = Filament::auth()->user()->plant_id;
@@ -329,7 +394,6 @@ class BeforeTestReadingResource extends Resource
// return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray(); // return ($userHas && strlen($userHas) > 0) ? Plant::where('id', $userHas)->pluck('name', 'id')->toArray() : Plant::orderBy('code')->pluck('name', 'id')->toArray();
}) })
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) { ->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('Line', null); $set('Line', null);
$set('item_code', null); $set('item_code', null);
@@ -337,26 +401,25 @@ class BeforeTestReadingResource extends Resource
}), }),
Select::make('Line') Select::make('Line')
->label('Search by Line Name') ->label('Search by Line Name')
->searchable()
->nullable() ->nullable()
->searchable()
->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('Plant'); $plantId = $get('Plant');
if (! $plantId) { if (! $plantId) {
return []; return [];
} }
return Line::where('plant_id', $plantId) return Line::where('plant_id', $plantId)->pluck('name', 'id')->toArray();
->pluck('name', 'id')
->toArray();
}) })
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) { ->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('item_code', null); $set('item_code', null);
}), }),
Select::make('machine_name') Select::make('machine_name')
->label('Search by Work Center') ->label('Search by Work Center')
->searchable()
->nullable() ->nullable()
->searchable()
->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('Plant'); $plantId = $get('Plant');
$lineId = $get('Line'); $lineId = $get('Line');
@@ -365,31 +428,26 @@ class BeforeTestReadingResource extends Resource
return []; return [];
} }
return Machine::where('plant_id', $plantId) return Machine::where('plant_id', $plantId)->where('line_id', $lineId)->pluck('work_center', 'id')->toArray();
->where('line_id', $lineId) }),
->pluck('work_center', 'id')
->toArray();
})
->reactive(),
Select::make('item_code') Select::make('item_code')
->label('Search by Item Code') ->label('Search by Item Code')
->searchable()
->nullable() ->nullable()
->searchable()
->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('Plant'); $plantId = $get('Plant');
if ($plantId) {
return Item::where('plant_id', $plantId) if (empty($plantId)) {
->whereHas('motorTestingMasters')
->pluck('code', 'id')
->toArray();
} else {
return []; return [];
// return Item::whereHas('motorTestingMasters')
// ->pluck('code', 'id')
// ->toArray();
} }
return Item::whereHas('motorTestingMasters', function ($query) use ($plantId) {
if ($plantId) {
$query->where('plant_id', $plantId);
}
})->pluck('code', 'id')->toArray();
}) })
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) { ->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('item_description', null); $set('item_description', null);
}), }),
@@ -399,57 +457,52 @@ class BeforeTestReadingResource extends Resource
->placeholder('Enter Serial Number'), ->placeholder('Enter Serial Number'),
Select::make('subassembly_code') Select::make('subassembly_code')
->label('Search by Subassembly Code') ->label('Search by Subassembly Code')
->searchable()
->nullable() ->nullable()
->searchable()
->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('Plant'); $plantId = $get('Plant');
if ($plantId) {
return MotorTestingMaster::whereHas('beforeTestReadings', function ($query) { if (empty($plantId)) {
$query->whereNotNull('id');
})->whereNotNull('subassembly_code')->orderBy('subassembly_code')->pluck('subassembly_code', 'id');
} else {
return []; return [];
// return Item::whereHas('motorTestingMasters')
// ->pluck('code', 'id')
// ->toArray();
} }
return MotorTestingMaster::whereHas('beforeTestReadings', function ($query) use ($plantId) {
if ($plantId) {
$query->where('plant_id', $plantId);
}
$query->whereNotNull('id');
})->whereNotNull('subassembly_code')->orderBy('subassembly_code')->pluck('subassembly_code', 'id');
}) })
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) { ->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('item_description', null); $set('item_description', null);
}), }),
Select::make('item_description') Select::make('item_description')
->label('Search by Model') ->label('Search by Model')
->nullable()
->searchable() ->searchable()
->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('Plant'); $plantId = $get('Plant');
// $query = Item::query(); if (empty($plantId)) {
// if ($plantId) {
// $query->where('plant_id', $plantId);
// }
$plantId = $get('Plant');
if ($plantId) {
return Item::where('plant_id', $plantId)
->whereHas('motorTestingMasters')
->pluck('description', 'id')
->toArray();
} else {
return []; return [];
// return Item::whereHas('motorTestingMasters')
// ->pluck('description', 'id')
// ->toArray();
} }
// return $query->pluck('description', 'description')->toArray();
return Item::whereHas('motorTestingMasters', function ($query) use ($plantId) {
if ($plantId) {
$query->where('plant_id', $plantId);
}
})->pluck('description', 'id')->toArray();
}) })
->reactive()
->afterStateUpdated(function ($state, callable $set, callable $get) { ->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('item_code', null); $set('item_code', null);
}), }),
Select::make('connection') Select::make('connection')
->label('Connection') ->label('Connection')
->required() ->nullable()
->reactive()
->selectablePlaceholder(false)
->default('Star') ->default('Star')
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('Plant'); $plantId = $get('Plant');
@@ -466,11 +519,12 @@ class BeforeTestReadingResource extends Resource
->toArray(); ->toArray();
} }
}) })
->selectablePlaceholder(false) ->required(),
->reactive(),
Select::make('tested_by') Select::make('tested_by')
->label('Tested By') ->label('Tested By')
->nullable() ->nullable()
->searchable()
->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('Plant'); $plantId = $get('Plant');
if (! $plantId) { if (! $plantId) {
@@ -478,22 +532,22 @@ class BeforeTestReadingResource extends Resource
} else { } else {
return BeforeTestReading::where('plant_id', $plantId)->whereNotNull('tested_by')->select('tested_by')->distinct()->pluck('tested_by', 'tested_by'); return BeforeTestReading::where('plant_id', $plantId)->whereNotNull('tested_by')->select('tested_by')->distinct()->pluck('tested_by', 'tested_by');
} }
}) }),
->searchable() DateTimePicker::make('created_from')
->reactive(),
DateTimePicker::make(name: 'created_from')
->label('Created From') ->label('Created From')
->placeholder(placeholder: 'Select From DateTime') ->placeholder('Select From DateTime')
->reactive() ->reactive()
->native(false), ->native(false),
DateTimePicker::make('created_to') DateTimePicker::make('created_to')
->label('Created To') ->label('Created To')
->placeholder(placeholder: 'Select To DateTime') ->placeholder('Select To DateTime')
->reactive() ->reactive()
->native(false), ->native(false),
Select::make('updated_by') Select::make('updated_by')
->label('Updated By') ->label('Updated By')
->nullable() ->nullable()
->searchable()
->reactive()
->options(function (callable $get) { ->options(function (callable $get) {
$plantId = $get('Plant'); $plantId = $get('Plant');
if (! $plantId) { if (! $plantId) {
@@ -501,17 +555,15 @@ class BeforeTestReadingResource extends Resource
} else { } else {
return BeforeTestReading::where('plant_id', $plantId)->whereNotNull('updated_by')->select('updated_by')->distinct()->pluck('updated_by', 'updated_by'); return BeforeTestReading::where('plant_id', $plantId)->whereNotNull('updated_by')->select('updated_by')->distinct()->pluck('updated_by', 'updated_by');
} }
}) }),
->searchable() DateTimePicker::make('updated_from')
->reactive(),
DateTimePicker::make(name: 'updated_from')
->label('Updated From') ->label('Updated From')
->placeholder(placeholder: 'Select From DateTime') ->placeholder('Select From DateTime')
->reactive() ->reactive()
->native(false), ->native(false),
DateTimePicker::make('updated_to') DateTimePicker::make('updated_to')
->label('Updated To') ->label('Updated To')
->placeholder(placeholder: 'Select To DateTime') ->placeholder('Select To DateTime')
->reactive() ->reactive()
->native(false), ->native(false),
]) ])