fix: update field visibility logic and disable inputs based on read-only status
(cherry picked from commit 3516e1ff44503e6cabf029b202d0f9874691cebf)
This commit is contained in:
parent
bfe4125182
commit
451a67cfd1
@ -65,7 +65,14 @@
|
|||||||
<div
|
<div
|
||||||
v-if="
|
v-if="
|
||||||
field.read_only &&
|
field.read_only &&
|
||||||
!['Check', 'Dropdown'].includes(field.fieldtype)
|
![
|
||||||
|
'Int',
|
||||||
|
'Float',
|
||||||
|
'Currency',
|
||||||
|
'Percent',
|
||||||
|
'Check',
|
||||||
|
'Dropdown',
|
||||||
|
].includes(field.fieldtype)
|
||||||
"
|
"
|
||||||
class="flex h-7 cursor-pointer items-center px-2 py-1 text-ink-gray-5"
|
class="flex h-7 cursor-pointer items-center px-2 py-1 text-ink-gray-5"
|
||||||
>
|
>
|
||||||
@ -266,6 +273,7 @@
|
|||||||
@change.stop="
|
@change.stop="
|
||||||
fieldChange(flt($event.target.value), field)
|
fieldChange(flt($event.target.value), field)
|
||||||
"
|
"
|
||||||
|
:disabled="Boolean(field.read_only)"
|
||||||
/>
|
/>
|
||||||
<FormattedInput
|
<FormattedInput
|
||||||
v-else-if="field.fieldtype === 'Int'"
|
v-else-if="field.fieldtype === 'Int'"
|
||||||
@ -275,6 +283,7 @@
|
|||||||
:placeholder="field.placeholder"
|
:placeholder="field.placeholder"
|
||||||
:debounce="500"
|
:debounce="500"
|
||||||
@change.stop="fieldChange($event.target.value, field)"
|
@change.stop="fieldChange($event.target.value, field)"
|
||||||
|
:disabled="Boolean(field.read_only)"
|
||||||
/>
|
/>
|
||||||
<FormattedInput
|
<FormattedInput
|
||||||
v-else-if="field.fieldtype === 'Float'"
|
v-else-if="field.fieldtype === 'Float'"
|
||||||
@ -288,6 +297,7 @@
|
|||||||
@change.stop="
|
@change.stop="
|
||||||
fieldChange(flt($event.target.value), field)
|
fieldChange(flt($event.target.value), field)
|
||||||
"
|
"
|
||||||
|
:disabled="Boolean(field.read_only)"
|
||||||
/>
|
/>
|
||||||
<FormattedInput
|
<FormattedInput
|
||||||
v-else-if="field.fieldtype === 'Currency'"
|
v-else-if="field.fieldtype === 'Currency'"
|
||||||
@ -301,6 +311,7 @@
|
|||||||
@change.stop="
|
@change.stop="
|
||||||
fieldChange(flt($event.target.value), field)
|
fieldChange(flt($event.target.value), field)
|
||||||
"
|
"
|
||||||
|
:disabled="Boolean(field.read_only)"
|
||||||
/>
|
/>
|
||||||
<FormControl
|
<FormControl
|
||||||
v-else
|
v-else
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user