ranjith-dev #448

Merged
jothi merged 2 commits from ranjith-dev into master 2026-03-09 18:22:46 +00:00
Showing only changes of commit ac9d9cec8d - Show all commits

View File

@@ -143,6 +143,8 @@ class ClassCharacteristicResource extends Resource
Forms\Components\TextInput::make('gamng')
->label('GAMNG')
->reactive()
->numeric()
->minValue(1.000)
->readOnly(fn (callable $get) => (! $get('arbid')))
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
@@ -151,6 +153,9 @@ class ClassCharacteristicResource extends Resource
Forms\Components\TextInput::make('lmnga')
->label('LMNGA')
->reactive()
->integer()
->minValue(1)
->maxValue(fn (callable $get) => ($get('gamng') ?? 1))
->readOnly(fn (callable $get) => (! $get('gamng')))
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
@@ -273,7 +278,8 @@ class ClassCharacteristicResource extends Resource
->readOnly(fn (callable $get) => (! $get('aufnr') || ! $get('gernr')))
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
})
->required(),
Forms\Components\TextInput::make('zmm_head_max')
->label('ZMM HEAD MAX')
->reactive()
@@ -1048,8 +1054,37 @@ class ClassCharacteristicResource extends Resource
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);
}),
Forms\Components\TextInput::make('motor_pump_pumpset_status')
Forms\Components\Select::make('motor_pump_pumpset_status')
->label('MOTOR PUMP PUMPSET STATUS')
// ->label('Search by PUMPSET Type')
->nullable()
->searchable()
->options(function (callable $get) {
$plantId = $get('plant_id');
$machineId = $get('machine_id');
$itemId = $get('item_id');
if (empty($plantId) || empty($machineId) || empty($itemId)) {
return [];
}
if (Str::contains($get('zmm_heading'), 'PRESSURE BOOSTER SYSTEM', ignoreCase: true)) {
return [
'1' => 'Motor',
'2' => 'Pump',
'3' => 'Pump Set',
'4' => 'Name Plate',
];
} elseif (Str::contains($get('zmm_heading'), 'PUMPSET', ignoreCase: true)) {
return [
'1' => 'Motor',
'2' => 'Pump',
'3' => 'Pump Set',
];
} else {
return [];
}
})
->reactive()
->afterStateUpdated(function (callable $set) {
$set('updated_by', Filament::auth()->user()?->name);