Updated load_rate value on plant change and part_validation allow logic changed
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

This commit is contained in:
dhanabalan
2026-02-07 14:33:30 +05:30
parent 506e4bee9f
commit bd176b4b0f

View File

@@ -66,7 +66,7 @@ class StickerMasterResource extends Resource
$set('item_description', null);
$set('item_error', null);
$set('panel_box_code', null);
$set('load_rate', null);
$set('load_rate', 0);
$set('bundle_quantity', null);
$set('material_type', null);
$set('part_validation1', null);
@@ -220,7 +220,7 @@ class StickerMasterResource extends Resource
->label('Part Validation 2')
->nullable()
->reactive()
->disabled(fn (Get $get) => empty($get('part_validation1')))
->readOnly(fn (callable $get) => empty($get('part_validation1')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('updated_by', Filament::auth()->user()?->name);
}),
@@ -229,7 +229,7 @@ class StickerMasterResource extends Resource
->label('Part Validation 3')
->nullable()
->reactive()
->disabled(fn (Get $get) => empty($get('part_validation2')))
->readOnly(fn (callable $get) => empty($get('part_validation1')) || empty($get('part_validation2')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('updated_by', Filament::auth()->user()?->name);
}),
@@ -238,7 +238,7 @@ class StickerMasterResource extends Resource
->label('Part Validation 4')
->nullable()
->reactive()
->disabled(fn (Get $get) => empty($get('part_validation3')))
->readOnly(fn (callable $get) => empty($get('part_validation1')) || empty($get('part_validation2')) || empty($get('part_validation3')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('updated_by', Filament::auth()->user()?->name);
}),
@@ -247,7 +247,7 @@ class StickerMasterResource extends Resource
->label('Part Validation 5 (Capacitor QR)')
->nullable()
->reactive()
->disabled(fn (Get $get) => empty($get('part_validation4')) && empty($get('panel_box_code')))
->readOnly(fn (callable $get) => (empty($get('part_validation1')) || empty($get('part_validation2')) || empty($get('part_validation3')) || empty($get('part_validation4'))) && empty($get('panel_box_code')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('updated_by', Filament::auth()->user()?->name);
}),
@@ -264,7 +264,7 @@ class StickerMasterResource extends Resource
->label('Laser Part Validation 2')
->nullable()
->reactive()
->disabled(fn (Get $get) => empty($get('laser_part_validation1')))
->readOnly(fn (callable $get) => empty($get('laser_part_validation1')))
->afterStateUpdated(function ($state, callable $set, callable $get) {
$set('updated_by', Filament::auth()->user()?->name);
}),