1
0
forked from poc/pds

Added searchable filter in view, default bundle quantity is 2

This commit is contained in:
dhanabalan
2025-04-23 14:00:09 +05:30
parent f303d7b31b
commit 2711758e2e

View File

@@ -195,7 +195,7 @@ class StickerMasterResource extends Resource
}
else
{
$set('bundle_quantity', 1);
$set('bundle_quantity', 2);
}
//$plantId = $get('plant_id');
})
@@ -205,8 +205,18 @@ class StickerMasterResource extends Resource
->label('Bundle Quantity')
->integer()
->readOnly(fn (callable $get) => $get('material_type') !== "2")
->nullable(),
->nullable()
->reactive()
->afterStateUpdated(function ($state, callable $set,callable $get) {
if($get('material_type') !== "2")
{
$set('bundle_quantity', null);
}
else if ($get('bundle_quantity') < 2)
{
$set('bundle_quantity', 2);
}
}),
Forms\Components\Checkbox::make('serial_number_motor')
->reactive()
@@ -390,9 +400,11 @@ class StickerMasterResource extends Resource
->numeric()
->sortable(),
Tables\Columns\TextColumn::make('item.code')
->sortable(),
->sortable()
->searchable(),
Tables\Columns\TextColumn::make('plant.name')
->sortable(),
->sortable()
->searchable(),
Tables\Columns\CheckboxColumn::make('serial_number_motor')
->disabled(true)
->sortable(),