Updated readonly rule
This commit is contained in:
@@ -72,14 +72,14 @@ class LocatorValidation extends Page implements HasForms
|
|||||||
->label('Scan Pallet No')
|
->label('Scan Pallet No')
|
||||||
->reactive()
|
->reactive()
|
||||||
// ->readonly(fn () => $this->disablePalletNo)
|
// ->readonly(fn () => $this->disablePalletNo)
|
||||||
->readOnly(fn (callable $get) => !empty($get('scan_serial_no')) || !empty($get('scan_locator_no')))
|
->readOnly(fn (callable $get) => !$get('plant_id') || !empty($get('scan_serial_no')) || !empty($get('scan_locator_no')))
|
||||||
->extraAttributes([
|
->extraAttributes([
|
||||||
'wire:keydown.enter' => 'processPalletNo($event.target.value)',
|
'wire:keydown.enter' => 'processPalletNo($event.target.value)',
|
||||||
]),
|
]),
|
||||||
TextInput::make('scan_serial_no')
|
TextInput::make('scan_serial_no')
|
||||||
->label('Scan Serial No')
|
->label('Scan Serial No')
|
||||||
// ->readOnly(fn () => $this->disableSerialNo)
|
// ->readOnly(fn () => $this->disableSerialNo)
|
||||||
->readOnly(fn (callable $get) => !empty($get('scan_pallet_no')) || !empty($get('scan_locator_no')))
|
->readOnly(fn (callable $get) => !$get('plant_id') || !empty($get('scan_pallet_no')) || !empty($get('scan_locator_no')))
|
||||||
->reactive()
|
->reactive()
|
||||||
->extraAttributes([
|
->extraAttributes([
|
||||||
'wire:keydown.enter' => 'processSerialNo($event.target.value)',
|
'wire:keydown.enter' => 'processSerialNo($event.target.value)',
|
||||||
@@ -87,7 +87,7 @@ class LocatorValidation extends Page implements HasForms
|
|||||||
TextInput::make('scan_locator_no')
|
TextInput::make('scan_locator_no')
|
||||||
->label('Scan Locator No')
|
->label('Scan Locator No')
|
||||||
->reactive()
|
->reactive()
|
||||||
// ->readOnly(fn ($get) => filled($get('scan_locator_no')))
|
->readOnly(fn (callable $get) => !$get('plant_id') || (!$get('scan_pallet_no') && !$get('scan_serial_no')))
|
||||||
->extraAttributes([
|
->extraAttributes([
|
||||||
'id' => 'scan_locator_no',
|
'id' => 'scan_locator_no',
|
||||||
'wire:keydown.enter' => 'processLocatorNo($event.target.value)',
|
'wire:keydown.enter' => 'processLocatorNo($event.target.value)',
|
||||||
|
|||||||
Reference in New Issue
Block a user