Browse Source

fix(nc-gui): shared form field readonly bg color issue

pull/7786/head
Ramesh Mane 9 months ago
parent
commit
eec83135fa
  1. 5
      packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue
  2. 6
      packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue

5
packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/index.vue

@ -182,14 +182,13 @@ const onDecode = async (scannedCodeValue: string) => {
<div> <div>
<NcTooltip :disabled="!field?.read_only"> <NcTooltip :disabled="!field?.read_only">
<template #title> {{ $t('activity.preFilledFields.lockedFieldTooltip') }} </template> <template #title> {{ $t('activity.preFilledFields.lockedFieldTooltip') }} </template>
<LazySmartsheetDivDataCell class="flex relative"> <LazySmartsheetDivDataCell class="flex relative">
<LazySmartsheetVirtualCell <LazySmartsheetVirtualCell
v-if="isVirtualCol(field)" v-if="isVirtualCol(field)"
:model-value="null" :model-value="null"
class="mt-0 nc-input nc-cell" class="mt-0 nc-input nc-cell"
:data-testid="`nc-form-input-cell-${field.label || field.title}`" :data-testid="`nc-form-input-cell-${field.label || field.title}`"
:class="`nc-form-input-${field.title?.replaceAll(' ', '')}`" :class="[`nc-form-input-${field.title?.replaceAll(' ', '')}`, { readonly: field?.read_only }]"
:column="field" :column="field"
:read-only="field?.read_only" :read-only="field?.read_only"
/> />
@ -201,7 +200,7 @@ const onDecode = async (scannedCodeValue: string) => {
:data-testid="`nc-form-input-cell-${field.label || field.title}`" :data-testid="`nc-form-input-cell-${field.label || field.title}`"
:class="[ :class="[
`nc-form-input-${field.title?.replaceAll(' ', '')}`, `nc-form-input-${field.title?.replaceAll(' ', '')}`,
{ 'layout-list': parseProp(field?.meta)?.isList }, { 'layout-list': parseProp(field?.meta)?.isList, 'readonly': field?.read_only },
]" ]"
:column="field" :column="field"
:edit-enabled="!field?.read_only" :edit-enabled="!field?.read_only"

6
packages/nc-gui/pages/index/[typeOrId]/form/[viewId]/index/survey.vue

@ -282,12 +282,14 @@ onMounted(() => {
<NcTooltip :disabled="!field?.read_only"> <NcTooltip :disabled="!field?.read_only">
<template #title> {{ $t('activity.preFilledFields.lockedFieldTooltip') }} </template> <template #title> {{ $t('activity.preFilledFields.lockedFieldTooltip') }} </template>
<LazySmartsheetDivDataCell v-if="field.title" class="relative nc-form-data-cell"> <LazySmartsheetDivDataCell v-if="field.title" class="relative nc-form-data-cell">
<LazySmartsheetVirtualCell <LazySmartsheetVirtualCell
v-if="isVirtualCol(field)" v-if="isVirtualCol(field)"
v-model="formState[field.title]" v-model="formState[field.title]"
class="mt-0 nc-input h-auto" class="mt-0 nc-input h-auto"
:class="{
readonly: field?.read_only,
}"
:row="{ row: {}, oldRow: {}, rowMeta: {} }" :row="{ row: {}, oldRow: {}, rowMeta: {} }"
:data-testid="`nc-survey-form__input-${field.title.replaceAll(' ', '')}`" :data-testid="`nc-survey-form__input-${field.title.replaceAll(' ', '')}`"
:column="field" :column="field"
@ -298,7 +300,7 @@ onMounted(() => {
v-else v-else
v-model="formState[field.title]" v-model="formState[field.title]"
class="nc-input h-auto" 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(' ', '')}`" :data-testid="`nc-survey-form__input-${field.title.replaceAll(' ', '')}`"
:column="field" :column="field"
:edit-enabled="!field?.read_only" :edit-enabled="!field?.read_only"

Loading…
Cancel
Save