Updated validation on resource file
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 3m6s
Laravel Larastan / larastan (pull_request) Failing after 3m36s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 19s
Laravel Pint / pint (pull_request) Successful in 3m6s
Laravel Larastan / larastan (pull_request) Failing after 3m36s
This commit is contained in:
@@ -143,6 +143,8 @@ class ClassCharacteristicResource extends Resource
|
|||||||
Forms\Components\TextInput::make('gamng')
|
Forms\Components\TextInput::make('gamng')
|
||||||
->label('GAMNG')
|
->label('GAMNG')
|
||||||
->reactive()
|
->reactive()
|
||||||
|
->numeric()
|
||||||
|
->minValue(1.000)
|
||||||
->readOnly(fn (callable $get) => (! $get('arbid')))
|
->readOnly(fn (callable $get) => (! $get('arbid')))
|
||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
@@ -151,6 +153,9 @@ class ClassCharacteristicResource extends Resource
|
|||||||
Forms\Components\TextInput::make('lmnga')
|
Forms\Components\TextInput::make('lmnga')
|
||||||
->label('LMNGA')
|
->label('LMNGA')
|
||||||
->reactive()
|
->reactive()
|
||||||
|
->integer()
|
||||||
|
->minValue(1)
|
||||||
|
->maxValue(fn (callable $get) => ($get('gamng') ?? 1))
|
||||||
->readOnly(fn (callable $get) => (! $get('gamng')))
|
->readOnly(fn (callable $get) => (! $get('gamng')))
|
||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
@@ -273,7 +278,8 @@ class ClassCharacteristicResource extends Resource
|
|||||||
->readOnly(fn (callable $get) => (! $get('aufnr') || ! $get('gernr')))
|
->readOnly(fn (callable $get) => (! $get('aufnr') || ! $get('gernr')))
|
||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
}),
|
})
|
||||||
|
->required(),
|
||||||
Forms\Components\TextInput::make('zmm_head_max')
|
Forms\Components\TextInput::make('zmm_head_max')
|
||||||
->label('ZMM HEAD MAX')
|
->label('ZMM HEAD MAX')
|
||||||
->reactive()
|
->reactive()
|
||||||
@@ -1048,8 +1054,37 @@ class ClassCharacteristicResource extends Resource
|
|||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$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('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()
|
->reactive()
|
||||||
->afterStateUpdated(function (callable $set) {
|
->afterStateUpdated(function (callable $set) {
|
||||||
$set('updated_by', Filament::auth()->user()?->name);
|
$set('updated_by', Filament::auth()->user()?->name);
|
||||||
|
|||||||
Reference in New Issue
Block a user