From 35dd69fa81eda7e09cef7e63819c85b10e48f3c4 Mon Sep 17 00:00:00 2001
From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
Date: Sat, 9 Mar 2024 11:51:09 +0000
Subject: [PATCH 04/40] fix(nc-gui): use only title for query params in prefill
form
---
.../composables/useSharedFormViewStore.ts | 29 ++++++++++++-------
1 file changed, 19 insertions(+), 10 deletions(-)
diff --git a/packages/nc-gui/composables/useSharedFormViewStore.ts b/packages/nc-gui/composables/useSharedFormViewStore.ts
index 6e7b971125..c977d19579 100644
--- a/packages/nc-gui/composables/useSharedFormViewStore.ts
+++ b/packages/nc-gui/composables/useSharedFormViewStore.ts
@@ -7,6 +7,7 @@ import type {
FormColumnType,
FormType,
LinkToAnotherRecordType,
+ SelectOptionsType,
StringOrNullType,
TableType,
} from 'nocodb-sdk'
@@ -254,9 +255,7 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
if (Object.keys(route.query).length && sharedViewMeta.value.preFilledMode !== PreFilledMode.Disabled) {
console.log('router', route.query)
columns.value = columns.value?.map((c) => {
- if ((c.label || c.title) && route.query?.[c.label!] === undefined && route.query?.[c.title!] === undefined) {
- return c
- }
+ if (!c.title || !route.query?.[c.title]) return c
switch (sharedViewMeta.value.preFilledMode) {
case PreFilledMode.Hidden: {
@@ -269,22 +268,32 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
switch (c.uidt) {
case UITypes.SingleSelect:
case UITypes.MultiSelect: {
- const allValues = (c.dtxp as string)?.split(',').map((o) => o?.replace(/^['"]|['"]$/g, ''))
- let options = ((route.query?.[c.label!] || route.query?.[c.title!]) as string)?.split(',').filter((op) => {
- console.log('options', op, allValues, allValues.includes(op))
- if (allValues.includes(op)) return true
- })
+ const limitOptions = Array.isArray(parseProp(c.meta).limitOptions)
+ ? parseProp(c.meta).limitOptions.reduce((ac, op) => {
+ if (op?.id) {
+ ac[op.id] = op
+ }
+ return ac
+ }, {})
+ : {}
+ const queryOptions = (route.query?.[c.title] as string)?.split(',')
+ let options = ((c.colOptions || []) as SelectOptionsType).options
+ .filter((op) => {
+ if (queryOptions.includes(op?.title!) && (limitOptions[op?.id!] ? limitOptions[op?.id!]?.show : true)) return true
+ })
+ .map((op) => op.title)
console.log('c', options, c)
if (options.length) {
- formState.value[c.title!] = c.uidt === UITypes.SingleSelect ? options[0] : options.join(',')
+ formState.value[c.title] = c.uidt === UITypes.SingleSelect ? options[0] : options.join(',')
}
+ console.log('form state', formState.value[c.title])
break
}
case UITypes.User: {
break
}
default: {
- formState.value[c.title!] = route.query?.[c.label!] || route.query?.[c.title!]
+ formState.value[c.title] = route.query?.[c.title]
}
}
From 9a57f4fca0aca7db1e2c2797ec72ceeb13bac8c2 Mon Sep 17 00:00:00 2001
From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
Date: Sat, 9 Mar 2024 11:51:10 +0000
Subject: [PATCH 05/40] feat(nc-gui): prefill user, text & numeric fields
---
.../dlg/share-and-collaborate/SharePage.vue | 2 +-
.../nc-gui/components/smartsheet/Cell.vue | 10 +-
.../composables/useSharedFormViewStore.ts | 103 +++++++++++++-----
packages/nc-gui/utils/cell.ts | 11 ++
4 files changed, 89 insertions(+), 37 deletions(-)
diff --git a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
index dd559457b8..8368d6766b 100644
--- a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
+++ b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
@@ -1,7 +1,7 @@
@@ -361,29 +386,74 @@ async function savePreFilledMode() {
v-if="activeView?.type === ViewTypes.FORM"
class="nc-pre-filled-mode-wrapper flex flex-col justify-between gap-y-3 mt-1 py-2 px-3 bg-gray-50 rounded-md"
>
-
+
{{ $t('activity.preFilledFields.title') }}
+
{
+ formPreFill = {
+ ...formPreFill,
+ preFillEnabled: value,
+ }
+ }
+ "
+ >
+
+
+
+
{
+ formPreFill = {
+ ...formPreFill,
+ preFilledMode: value || '',
+ }
+ }
+ "
>
-
-
-
{{ $t(`activity.preFilledFields.${mode}`) }}
-
-
-
+
+
+
+
{{ $t(`activity.preFilledFields.${mode}`) }}
+
+
+
+
+
+
+ {{ $t('tooltip.fillTheFormFieldFirst') }}
+
+
+
+
diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue
index 019306f309..705a787d24 100644
--- a/packages/nc-gui/components/smartsheet/Form.vue
+++ b/packages/nc-gui/components/smartsheet/Form.vue
@@ -43,6 +43,7 @@ import {
useViewColumnsOrThrow,
useViewData,
watch,
+ useViewsStore,
} from '#imports'
import type { ImageCropperConfig } from '~/lib'
@@ -104,6 +105,8 @@ const isPublic = inject(IsPublicInj, ref(false))
const { loadFormView, insertRow, formColumnData, formViewData, updateFormView } = useViewData(meta, view)
+const { preFillFormSearchParams } = storeToRefs(useViewsStore())
+
const reloadEventHook = inject(ReloadViewDataHookInj, createEventHook())
reloadEventHook.on(async () => {
@@ -199,6 +202,22 @@ const updateView = useDebounceFn(
{ maxWait: 2000 },
)
+const updatePreFillFormSearchParams = useDebounceFn(() => {
+ if (isLocked.value || !isUIAllowed('dataInsert')) return
+
+ const preFilledData = { ...formState, ...state.value }
+
+ const searchParams = new URLSearchParams()
+
+ for (const c of visibleColumns.value) {
+ if (c.title && preFilledData[c.title] && !isVirtualCol(c) && !(UITypes.Attachment === c.uidt)) {
+ searchParams.append(c.title, preFilledData[c.title])
+ }
+ }
+
+ preFillFormSearchParams.value = searchParams.toString()
+}, 250)
+
async function submitForm() {
if (isLocked.value || !isUIAllowed('dataInsert')) return
@@ -220,38 +239,6 @@ async function submitForm() {
submitted.value = true
}
-async function getPreFilledLink() {
- if (isLocked.value || !isUIAllowed('dataInsert') || !view.value?.uuid) return
-
- const preFilledData = { ...formState, ...state.value }
-
- const searchParams = new URLSearchParams()
-
- for (const c of visibleColumns.value) {
- if (c.title && preFilledData[c.title] && !isVirtualCol(c)) {
- searchParams.append(c.title, preFilledData[c.title])
- }
- }
-
- // get base url for workspace
- const baseUrl = getBaseUrl(workspaceStore.activeWorkspaceId)
-
- let dashboardUrl1 = dashboardUrl.value
-
- if (baseUrl) {
- dashboardUrl1 = `${baseUrl}${appInfo.value?.dashboardPath}`
- }
-
- copy(
- encodeURI(
- `${dashboardUrl1}#/nc/form/${view.value?.uuid}${parseProp(view.value?.meta).surveyMode ? '/survey' : ''}${
- searchParams.toString() ? `?${searchParams.toString()}` : ''
- }`,
- ),
- )
-
- message.info(t('msg.info.copiedToClipboard'))
-}
async function clearForm() {
if (isLocked.value || !isUIAllowed('dataInsert')) return
@@ -639,6 +626,10 @@ watch([focusLabel, activeRow], () => {
}
})
+watch([formState, state], () => {
+ updatePreFillFormSearchParams()
+})
+
useEventListener(
formRef,
'focusout',
@@ -1332,21 +1323,6 @@ useEventListener(
{{ $t('activity.clearForm') }}
-
- {{ $t('tooltip.formIsNotShared') }}
-
- {{ $t('activity.getPreFilledLink') }}
-
-
{
if (
!c.title ||
diff --git a/packages/nc-gui/lang/en.json b/packages/nc-gui/lang/en.json
index 47736cda95..062905a936 100644
--- a/packages/nc-gui/lang/en.json
+++ b/packages/nc-gui/lang/en.json
@@ -928,9 +928,7 @@
"addFieldFromFormView": "Add Field",
"selectAllFields": "Select all fields",
"preFilledFields": {
- "title": "Pre-filled Fields",
- "default": "Allow pre-filling fields",
- "disabled": "Disable pre-filling fields",
+ "title": "Enable Pre-fill",
"locked": "Lock pre-filled fields as read-only",
"hidden": "Hide pre-filled fields",
"lockedFieldTooltip": "Pre-filled value"
@@ -966,7 +964,7 @@
"clientKey": "Select .key file",
"clientCert": "Select .cert file",
"clientCA": "Select CA file",
- "formIsNotShared": "Form is not shared"
+ "fillTheFormFieldFirst": "Fill the form fields first"
},
"placeholder": {
"selectSlackChannels": "Select Slack channels",
diff --git a/packages/nc-gui/lib/enums.ts b/packages/nc-gui/lib/enums.ts
index 5001d068c9..abcd362f0f 100644
--- a/packages/nc-gui/lib/enums.ts
+++ b/packages/nc-gui/lib/enums.ts
@@ -138,8 +138,7 @@ export enum ImportSource {
}
export enum PreFilledMode {
- Default = 'default',
- Disabled = 'disabled',
+ Default = '',
Locked = 'locked',
Hidden = 'hidden',
}
diff --git a/packages/nc-gui/lib/types.ts b/packages/nc-gui/lib/types.ts
index cd61b37e47..24c1d997f5 100644
--- a/packages/nc-gui/lib/types.ts
+++ b/packages/nc-gui/lib/types.ts
@@ -115,6 +115,7 @@ interface SharedViewMeta extends Record {
theme?: Partial
allowCSVDownload?: boolean
rtl?: boolean
+ preFillEnabled?: boolean
preFilledMode?: PreFilledMode
}
diff --git a/packages/nc-gui/store/views.ts b/packages/nc-gui/store/views.ts
index f32ca96271..48f24a6555 100644
--- a/packages/nc-gui/store/views.ts
+++ b/packages/nc-gui/store/views.ts
@@ -116,6 +116,8 @@ export const useViewsStore = defineStore('viewsStore', () => {
// Used for Grid View Pagination
const isPaginationLoading = ref(true)
+ const preFillFormSearchParams = ref('')
+
const loadViews = async ({
tableId,
ignoreLoading,
@@ -282,6 +284,8 @@ export const useViewsStore = defineStore('viewsStore', () => {
if (!view) return
if (!view.base_id) return
+ preFillFormSearchParams.value = ''
+
const tableName = tablesStore.baseTables.get(view.base_id)?.find((t) => t.id === view.fk_model_id)?.title
const baseName = bases.basesList.find((p) => p.id === view.base_id)?.title
@@ -322,6 +326,7 @@ export const useViewsStore = defineStore('viewsStore', () => {
activeSorts,
activeNestedFilters,
isActiveViewLocked,
+ preFillFormSearchParams,
}
})
From ed0987b3d3a85c59a32d8a3581a2aa51b0fbebcf Mon Sep 17 00:00:00 2001
From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
Date: Sat, 9 Mar 2024 11:51:12 +0000
Subject: [PATCH 19/40] chore(nc-gui): lint
---
.../dlg/share-and-collaborate/SharePage.vue | 2 +-
.../nc-gui/components/smartsheet/Form.vue | 37 +++++++------------
2 files changed, 15 insertions(+), 24 deletions(-)
diff --git a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
index f197402783..e2a866f4ef 100644
--- a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
+++ b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
@@ -389,8 +389,8 @@ async function savePreFilledMode() {
{{ $t('activity.preFilledFields.title') }}
{
diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue
index 705a787d24..b9cc44a185 100644
--- a/packages/nc-gui/components/smartsheet/Form.vue
+++ b/packages/nc-gui/components/smartsheet/Form.vue
@@ -42,7 +42,6 @@ import {
useRoles,
useViewColumnsOrThrow,
useViewData,
- watch,
useViewsStore,
} from '#imports'
import type { ImageCropperConfig } from '~/lib'
@@ -71,13 +70,7 @@ const enum NcForm {
subheading = 'nc-form-sub-heading',
}
-const { isMobileMode, user, getBaseUrl, appInfo } = useGlobal()
-
-const { dashboardUrl } = useDashboard()
-
-const workspaceStore = useWorkspace()
-
-const { copy } = useCopy()
+const { isMobileMode, user } = useGlobal()
const { $api, $e } = useNuxtApp()
@@ -239,7 +232,6 @@ async function submitForm() {
submitted.value = true
}
-
async function clearForm() {
if (isLocked.value || !isUIAllowed('dataInsert')) return
@@ -1322,20 +1314,19 @@ useEventListener(
>
{{ $t('activity.clearForm') }}
-
-
- {{ $t('general.submit') }}
-
-
+
+
+ {{ $t('general.submit') }}
+
From 48432c40afea233b2bb9ebfdd1b42d52a935d759 Mon Sep 17 00:00:00 2001
From: Ramesh Mane <101566080+rameshmane7218@users.noreply.github.com>
Date: Sat, 9 Mar 2024 11:51:12 +0000
Subject: [PATCH 20/40] fix(nc-gui): invalid queryselector char issue
---
packages/nc-gui/components/smartsheet/Form.vue | 10 +++++++---
tests/playwright/pages/Dashboard/Form/index.ts | 10 ++++++++--
2 files changed, 15 insertions(+), 5 deletions(-)
diff --git a/packages/nc-gui/components/smartsheet/Form.vue b/packages/nc-gui/components/smartsheet/Form.vue
index b9cc44a185..123ac8b385 100644
--- a/packages/nc-gui/components/smartsheet/Form.vue
+++ b/packages/nc-gui/components/smartsheet/Form.vue
@@ -606,9 +606,13 @@ watch([formState, state.value], async () => {
watch(activeRow, (newValue) => {
if (newValue) {
- document
- .querySelector(`.nc-form-field-item-${newValue?.replaceAll(' ', '')}`)
- ?.scrollIntoView({ behavior: 'smooth', block: 'center' })
+ const field = document.querySelector(`.nc-form-field-item-${CSS.escape(newValue?.replaceAll(' ', ''))}`)
+
+ if (field) {
+ setTimeout(() => {
+ field?.scrollIntoView({ behavior: 'smooth', block: 'center' })
+ }, 50)
+ }
}
})
diff --git a/tests/playwright/pages/Dashboard/Form/index.ts b/tests/playwright/pages/Dashboard/Form/index.ts
index 0f18392039..bba939f9e7 100644
--- a/tests/playwright/pages/Dashboard/Form/index.ts
+++ b/tests/playwright/pages/Dashboard/Form/index.ts
@@ -116,7 +116,10 @@ export class FormPage extends BasePage {
await src.dragTo(dst);
} else if (mode === 'hideField') {
// in form-v2, hide field will be using right sidebar
- await this.formFields.locator(`[data-testid="nc-form-field-item-${field}"]`).locator('.nc-switch').click();
+ await this.formFields
+ .locator(`[data-testid="nc-form-field-item-${CSS.escape(field)}"]`)
+ .locator('.nc-switch')
+ .click();
}
}
@@ -132,7 +135,10 @@ export class FormPage extends BasePage {
await src.dragTo(dst, { trial: true });
await src.dragTo(dst);
} else if (mode === 'clickField') {
- await this.formFields.locator(`[data-testid="nc-form-field-item-${field}"]`).locator('.nc-switch').click();
+ await this.formFields
+ .locator(`[data-testid="nc-form-field-item-${CSS.escape(field)}"]`)
+ .locator('.nc-switch')
+ .click();
}
}
From 0d9db02f683e121cd509e4ebdbcb639e5ad06f33 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 21/40] fix(nc-gui): prefill issue if query param key is
encoded
---
packages/nc-gui/composables/useSharedFormViewStore.ts | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/packages/nc-gui/composables/useSharedFormViewStore.ts b/packages/nc-gui/composables/useSharedFormViewStore.ts
index 2518baeeb7..dce85a3107 100644
--- a/packages/nc-gui/composables/useSharedFormViewStore.ts
+++ b/packages/nc-gui/composables/useSharedFormViewStore.ts
@@ -257,9 +257,10 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
function handlePreFillForm() {
if (Object.keys(route.query).length && sharedViewMeta.value.preFillEnabled) {
columns.value = columns.value?.map((c) => {
+ const queryParam = route.query?.[c.title as string] || route.query?.[encodeURIComponent(c.title as string)]
if (
!c.title ||
- !route.query?.[c.title] ||
+ !queryParam ||
isSystemColumn(c) ||
isVirtualCol(c) ||
// (isVirtualCol(c) && !isLinksOrLTAR(c)) || // Todo: Enable this after linksOrLTAR prefill supported
@@ -267,7 +268,8 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
) {
return c
}
- const preFillValue = getPreFillValue(c, decodeURIComponent(route.query?.[c.title] as string).trim())
+
+ const preFillValue = getPreFillValue(c, decodeURIComponent(queryParam as string).trim())
if (preFillValue !== undefined) {
// Prefill form state
formState.value[c.title] = preFillValue
From 979430b0e7d289b3974fd90a340be0a4a95fc849 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 22/40] test: pw test fails issue
---
tests/playwright/pages/Dashboard/Form/index.ts | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tests/playwright/pages/Dashboard/Form/index.ts b/tests/playwright/pages/Dashboard/Form/index.ts
index bba939f9e7..ba46e39625 100644
--- a/tests/playwright/pages/Dashboard/Form/index.ts
+++ b/tests/playwright/pages/Dashboard/Form/index.ts
@@ -117,7 +117,7 @@ export class FormPage extends BasePage {
} else if (mode === 'hideField') {
// in form-v2, hide field will be using right sidebar
await this.formFields
- .locator(`[data-testid="nc-form-field-item-${CSS.escape(field)}"]`)
+ .locator(`[data-testid="nc-form-field-item-${window.CSS.escape(field)}"]`)
.locator('.nc-switch')
.click();
}
@@ -136,7 +136,7 @@ export class FormPage extends BasePage {
await src.dragTo(dst);
} else if (mode === 'clickField') {
await this.formFields
- .locator(`[data-testid="nc-form-field-item-${CSS.escape(field)}"]`)
+ .locator(`[data-testid="nc-form-field-item-${window.CSS.escape(field)}"]`)
.locator('.nc-switch')
.click();
}
From d07ed1638e75511cc4048a0f894415166d15a559 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 23/40] test(nc-gui): pw test fail issue
---
tests/playwright/pages/Dashboard/Form/index.ts | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/tests/playwright/pages/Dashboard/Form/index.ts b/tests/playwright/pages/Dashboard/Form/index.ts
index ba46e39625..0f18392039 100644
--- a/tests/playwright/pages/Dashboard/Form/index.ts
+++ b/tests/playwright/pages/Dashboard/Form/index.ts
@@ -116,10 +116,7 @@ export class FormPage extends BasePage {
await src.dragTo(dst);
} else if (mode === 'hideField') {
// in form-v2, hide field will be using right sidebar
- await this.formFields
- .locator(`[data-testid="nc-form-field-item-${window.CSS.escape(field)}"]`)
- .locator('.nc-switch')
- .click();
+ await this.formFields.locator(`[data-testid="nc-form-field-item-${field}"]`).locator('.nc-switch').click();
}
}
@@ -135,10 +132,7 @@ export class FormPage extends BasePage {
await src.dragTo(dst, { trial: true });
await src.dragTo(dst);
} else if (mode === 'clickField') {
- await this.formFields
- .locator(`[data-testid="nc-form-field-item-${window.CSS.escape(field)}"]`)
- .locator('.nc-switch')
- .click();
+ await this.formFields.locator(`[data-testid="nc-form-field-item-${field}"]`).locator('.nc-switch').click();
}
}
From 3662a5ce609d6411e7741d646c1ebc12786aa103 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 24/40] fix(nc-gui): update prefill enable switch testid
---
.../components/dlg/share-and-collaborate/SharePage.vue | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
index e2a866f4ef..e053d9830f 100644
--- a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
+++ b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
@@ -391,7 +391,7 @@ async function savePreFilledMode() {
{
formPreFill = {
@@ -404,13 +404,12 @@ async function savePreFilledMode() {
-
-
{
formPreFill = {
From c71bcab080936a611edbcf4af2325e280356a332 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 25/40] fix(nc-gui): use existing copy link component for
prefill link
---
.../dlg/share-and-collaborate/SharePage.vue | 93 +++++++------------
1 file changed, 35 insertions(+), 58 deletions(-)
diff --git a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
index e053d9830f..f986170996 100644
--- a/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
+++ b/packages/nc-gui/components/dlg/share-and-collaborate/SharePage.vue
@@ -54,10 +54,6 @@ const url = computed(() => {
return sharedViewUrl() ?? ''
})
-const forPreFillUrl = computed(() => {
- return sharedViewUrl(true) ?? ''
-})
-
const passwordProtectedLocal = ref(false)
const passwordProtected = computed(() => {
@@ -179,7 +175,7 @@ const formPreFill = computed({
},
})
-function sharedViewUrl(isPreFillUrl: boolean = false) {
+function sharedViewUrl() {
if (!activeView.value) return
let viewType
@@ -213,9 +209,7 @@ function sharedViewUrl(isPreFillUrl: boolean = false) {
return encodeURI(
`${dashboardUrl1}#/nc/${viewType}/${activeView.value.uuid}${surveyMode.value ? '/survey' : ''}${
- isPreFillUrl && formPreFill.value.preFillEnabled && viewStore.preFillFormSearchParams
- ? `?${viewStore.preFillFormSearchParams}`
- : ''
+ formPreFill.value.preFillEnabled && viewStore.preFillFormSearchParams ? `?${viewStore.preFillFormSearchParams}` : ''
}`,
)
}
@@ -403,57 +397,40 @@ async function savePreFilledMode() {
>
-
-
{
- formPreFill = {
- ...formPreFill,
- preFilledMode: value || '',
- }
+
+ {
+ formPreFill = {
+ ...formPreFill,
+ preFilledMode: value || '',
}
- "
- >
-
-
-
-
-
-
-
{{ $t(`activity.preFilledFields.${mode}`) }}
-
-
-
-
-
-
-
- {{ $t('tooltip.fillTheFormFieldFirst') }}
-
-
-
-
-
+ }
+ "
+ >
+
+
+
+
+
+
+
{{ $t(`activity.preFilledFields.${mode}`) }}
+
+
+
+
+
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 26/40] 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) => {