From eec83135fa1801a86e772fede8bf22da3aa93f0d Mon Sep 17 00:00:00 2001
From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
Date: Sat, 9 Mar 2024 11:51:13 +0000
Subject: [PATCH] fix(nc-gui): shared form field readonly bg color issue
---
.../pages/index/[typeOrId]/form/[viewId]/index/index.vue | 5 ++---
.../pages/index/[typeOrId]/form/[viewId]/index/survey.vue | 6 ++++--
2 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue
index 6658252457..4e8d4083ad 100644
--- a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue
+++ b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue
@@ -182,14 +182,13 @@ const onDecode = async (scannedCodeValue: string) => {
{{ $t('activity.preFilledFields.lockedFieldTooltip') }}
-
@@ -201,7 +200,7 @@ const onDecode = async (scannedCodeValue: string) => {
:data-testid="`nc-form-input-cell-${field.label || field.title}`"
:class="[
`nc-form-input-${field.title?.replaceAll(' ', '')}`,
- { 'layout-list': parseProp(field?.meta)?.isList },
+ { 'layout-list': parseProp(field?.meta)?.isList, 'readonly': field?.read_only },
]"
:column="field"
:edit-enabled="!field?.read_only"
diff --git a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue
index bac5a0c11b..0724623a40 100644
--- a/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue
+++ b/packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue
@@ -282,12 +282,14 @@ onMounted(() => {
{{ $t('activity.preFilledFields.lockedFieldTooltip') }}
-
{
v-else
v-model="formState[field.title]"
class="nc-input h-auto"
- :class="parseProp(field?.meta)?.isList ? 'layout-list' : ''"
+ :class="{ 'layout-list': parseProp(field?.meta)?.isList, 'readonly': field?.read_only }"
:data-testid="`nc-survey-form__input-${field.title.replaceAll(' ', '')}`"
:column="field"
:edit-enabled="!field?.read_only"