1
0
forked from poc/pds

Updated scrap_quantity as '0' when rework_status is 'No'

This commit is contained in:
dhanabalan
2026-02-21 18:50:58 +05:30
parent c3d4a97277
commit 81d2f4bd2c

View File

@@ -458,9 +458,9 @@ class ProcessOrderResource extends Resource
->options([0 => 'No', 1 => 'Yes'])
->reactive()
->afterStateUpdated(function (callable $set, callable $get, ?string $state) {
// if ($get('id') && $get('rework_status') == 1) {
// $set('rework_status', 1);
// }
if ($state == 0) {
$set('scrap_quantity', '0');
}
$set('updated_by', Filament::auth()->user()?->name);
})
->rule(function (callable $get, callable $set) {