Browse Source

Nc fix: Shared view for gallery, kanban + expand record issue if primary column is visible (#8312)

* fix(nc-gui): shared view expand form issue if primary column is visible

* chore(nc-gui): lint
pull/8319/head
Ramesh Mane 7 months ago committed by GitHub
parent
commit
e05ca5ea25
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 4
      packages/nc-gui/components/smartsheet/Gallery.vue
  2. 2
      packages/nc-gui/components/smartsheet/Kanban.vue

4
packages/nc-gui/components/smartsheet/Gallery.vue

@ -8,6 +8,7 @@ import {
IsFormInj, IsFormInj,
IsGalleryInj, IsGalleryInj,
IsGridInj, IsGridInj,
IsPublicInj,
MetaInj, MetaInj,
NavigateDir, NavigateDir,
OpenNewRecordFormHookInj, OpenNewRecordFormHookInj,
@ -36,6 +37,7 @@ const view = inject(ActiveViewInj, ref())
const reloadViewMetaHook = inject(ReloadViewMetaHookInj) const reloadViewMetaHook = inject(ReloadViewMetaHookInj)
const reloadViewDataHook = inject(ReloadViewDataHookInj) const reloadViewDataHook = inject(ReloadViewDataHookInj)
const openNewRecordFormHook = inject(OpenNewRecordFormHookInj, createEventHook()) const openNewRecordFormHook = inject(OpenNewRecordFormHookInj, createEventHook())
const isPublic = inject(IsPublicInj, ref(false))
const { isViewDataLoading } = storeToRefs(useViewsStore()) const { isViewDataLoading } = storeToRefs(useViewsStore())
const { isSqlView, xWhere } = useSmartsheetStoreOrThrow() const { isSqlView, xWhere } = useSmartsheetStoreOrThrow()
@ -125,7 +127,7 @@ const attachments = (record: any): Attachment[] => {
const expandForm = (row: RowType, state?: Record<string, any>) => { const expandForm = (row: RowType, state?: Record<string, any>) => {
const rowId = extractPkFromRow(row.row, meta.value!.columns!) const rowId = extractPkFromRow(row.row, meta.value!.columns!)
if (rowId) { if (rowId && !isPublic.value) {
router.push({ router.push({
query: { query: {
...route.query, ...route.query,

2
packages/nc-gui/components/smartsheet/Kanban.vue

@ -162,7 +162,7 @@ reloadViewMetaHook?.on(async () => {
const expandForm = (row: RowType, state?: Record<string, any>) => { const expandForm = (row: RowType, state?: Record<string, any>) => {
const rowId = extractPkFromRow(row.row, meta.value!.columns!) const rowId = extractPkFromRow(row.row, meta.value!.columns!)
if (rowId) { if (rowId && !isPublic.value) {
router.push({ router.push({
query: { query: {
...route.value.query, ...route.value.query,

Loading…
Cancel
Save