1
0
forked from poc/pds

Updated auto focus option while disabled

This commit is contained in:
dhanabalan
2025-04-25 09:22:28 +05:30
parent 617853cdf0
commit b2dc356aed

View File

@@ -299,9 +299,10 @@ class ProductionQuantityResource extends Resource
->required()
->columnSpan(2)
// ->rules(['regex:/^[1-9][0-9]{6,}$/'])
->disabled(function ($get) {
return $get('item_code');
})
// ->disabled(function ($get) {
// return $get('item_code');
// })
// ->readOnly(fn (callable $get) => $get('item_code'))
->default(function () {
// $latestProductionOrder = ProductionQuantity::latest()->first()->production_order;
// return $latestProductionOrder ?? null;
@@ -325,9 +326,10 @@ class ProductionQuantityResource extends Resource
->columnSpan(2)
->autofocus(true)
->debounce(100)
->disabled(function ($get) {
return !$get('production_order');
})
// ->disabled(function ($get) {
// return !$get('production_order');
// })
// ->submitOnEnter()
->afterStateUpdated(function ($state, callable $get, callable $set) {
$set('success_msg', null);