diff --git a/packages/nc-gui/components/smartsheet/grid/GroupBy.vue b/packages/nc-gui/components/smartsheet/grid/GroupBy.vue index 49844a3d73..561ad85a35 100644 --- a/packages/nc-gui/components/smartsheet/grid/GroupBy.vue +++ b/packages/nc-gui/components/smartsheet/grid/GroupBy.vue @@ -49,8 +49,6 @@ const fullPage = computed(() => { return props.fullPage ?? (tableHeader.value?.offsetWidth ?? 0) > (props.viewWidth ?? 0) }) -const { isUIAllowed } = useRoles() - const _activeGroupKeys = ref() const activeGroups = computed(() => { @@ -154,6 +152,9 @@ const parseKey = (group) => { } return [key] } + +const shouldRenderCell = (column) => + [UITypes.Lookup, UITypes.Attachment, UITypes.Barcode, UITypes.QrCode, UITypes.Links].includes(column?.uidt) +
+ +
{ - - + diff --git a/packages/nc-gui/components/smartsheet/grid/GroupByLabel.vue b/packages/nc-gui/components/smartsheet/grid/GroupByLabel.vue index b4cff2b4f2..2e9638e344 100644 --- a/packages/nc-gui/components/smartsheet/grid/GroupByLabel.vue +++ b/packages/nc-gui/components/smartsheet/grid/GroupByLabel.vue @@ -1,22 +1,18 @@ diff --git a/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue index 2f67b75262..94b17c9702 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/GroupByMenu.vue @@ -158,15 +158,11 @@ const loadAllowedLookups = async () => { if (col.uidt !== UITypes.Lookup) continue let nextCol = col - // check the lookup column is supported type or not - while (btLookup && nextCol && nextCol.uidt === UITypes.Lookup) { + while (nextCol && nextCol.uidt === UITypes.Lookup) { const lookupRelation = (await getMeta(nextCol.fk_model_id))?.columns?.find( (c) => c.id === (nextCol.colOptions as LookupType).fk_relation_column_id, ) - if ((lookupRelation.colOptions as LinkToAnotherRecordType).type !== RelationTypes.BELONGS_TO) { - continue - } const relatedTableMeta = await getMeta((lookupRelation.colOptions as LinkToAnotherRecordType).fk_related_model_id) diff --git a/packages/nc-gui/composables/useViewGroupBy.ts b/packages/nc-gui/composables/useViewGroupBy.ts index 7d715082c5..caa4d6642f 100644 --- a/packages/nc-gui/composables/useViewGroupBy.ts +++ b/packages/nc-gui/composables/useViewGroupBy.ts @@ -91,7 +91,7 @@ export const useViewGroupBy = (view: Ref, where?: Computed } // convert to JSON string if non-string value - if(value && typeof value === 'object') { + if (value && typeof value === 'object') { value = JSON.stringify(value) }