Browse Source

Merge pull request #7316 from nocodb/nc-fix/shared-user-field

fix: shared form user field
pull/7320/head
Raju Udava 10 months ago committed by GitHub
parent
commit
b2296f9522
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      packages/nc-gui/components/smartsheet/header/CellIcon.ts
  2. 7
      packages/nc-gui/composables/useSharedFormViewStore.ts

2
packages/nc-gui/components/smartsheet/header/CellIcon.ts

@ -84,7 +84,7 @@ const renderIcon = (column: ColumnType, abstractType: any) => {
} else if (isGeometry(column)) {
return iconMap.calculator
} else if (isUser(column)) {
if ((column.meta as { is_multi: boolean; notify: boolean }).is_multi) {
if ((column.meta as { is_multi?: boolean; notify?: boolean })?.is_multi) {
return iconMap.phUsers
}
return iconMap.phUser

7
packages/nc-gui/composables/useSharedFormViewStore.ts

@ -60,6 +60,9 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
const baseStore = useBase()
const { base } = storeToRefs(baseStore)
const basesStore = useBases()
const { basesUser } = storeToRefs(basesStore)
const { t } = useI18n()
const formState = ref<Record<string, any>>({})
@ -127,6 +130,10 @@ const [useProvideSharedFormStore, useSharedFormStore] = useInjectionState((share
const relatedMetas = { ...viewMeta.relatedMetas }
Object.keys(relatedMetas).forEach((key) => setMeta(relatedMetas[key]))
if (viewMeta.users) {
basesUser.value.set(viewMeta.base_id, viewMeta.users)
}
} catch (e: any) {
if (e.response && e.response.status === 404) {
notFound.value = true

Loading…
Cancel
Save