Updated code visible func. and '3->quantity' in material type
This commit is contained in:
@@ -82,7 +82,7 @@ class StickerMasterResource extends Resource
|
|||||||
->nullable()
|
->nullable()
|
||||||
->searchable()
|
->searchable()
|
||||||
->reactive()
|
->reactive()
|
||||||
->disabled(fn (Get $get) => !empty($get('id')))
|
// ->disabled(fn (Get $get) => !empty($get('id')))
|
||||||
->live(debounce: 500) // Enable live updates
|
->live(debounce: 500) // Enable live updates
|
||||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||||
|
|
||||||
@@ -179,6 +179,7 @@ class StickerMasterResource extends Resource
|
|||||||
->options([
|
->options([
|
||||||
'1' => 'Individual',
|
'1' => 'Individual',
|
||||||
'2' => 'Bundle',
|
'2' => 'Bundle',
|
||||||
|
'3' => 'Quantity',
|
||||||
])
|
])
|
||||||
->reactive()
|
->reactive()
|
||||||
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
->afterStateUpdated(function ($state, callable $set, callable $get) {
|
||||||
@@ -206,6 +207,7 @@ class StickerMasterResource extends Resource
|
|||||||
->integer()
|
->integer()
|
||||||
->readOnly(fn (callable $get) => $get('material_type') !== "2")
|
->readOnly(fn (callable $get) => $get('material_type') !== "2")
|
||||||
->nullable()
|
->nullable()
|
||||||
|
->minValue(2)
|
||||||
->reactive()
|
->reactive()
|
||||||
->afterStateUpdated(function ($state, callable $set,callable $get) {
|
->afterStateUpdated(function ($state, callable $set,callable $get) {
|
||||||
if($get('material_type') !== "2")
|
if($get('material_type') !== "2")
|
||||||
|
|||||||
Reference in New Issue
Block a user