Added unique sticker id logic for sticker structure page #1201
@@ -39,10 +39,14 @@ class StickerStructureDetailResource extends Resource
|
|||||||
->label('Sticker ID')
|
->label('Sticker ID')
|
||||||
->reactive()
|
->reactive()
|
||||||
->required()
|
->required()
|
||||||
|
->unique(
|
||||||
|
table: 'sticker_structure_details',
|
||||||
|
column: 'sticker_id',
|
||||||
|
ignoreRecord: true
|
||||||
|
)
|
||||||
->afterStateUpdated(function ($state, callable $set) {
|
->afterStateUpdated(function ($state, callable $set) {
|
||||||
//\Log::info('Sticker ID typed:', ['sticker_id' => $state]);
|
$set('sticker_id_live', $state);
|
||||||
$set('sticker_id_live', $state);
|
}),
|
||||||
}),
|
|
||||||
Forms\Components\TextInput::make('sticker_width')
|
Forms\Components\TextInput::make('sticker_width')
|
||||||
->label('Sticker Width')
|
->label('Sticker Width')
|
||||||
->required(),
|
->required(),
|
||||||
|
|||||||
Reference in New Issue
Block a user