From a3866486bc1d42cb343a8cbbc213d6bf81cd284f Mon Sep 17 00:00:00 2001 From: Wing-Kam Wong Date: Fri, 16 Sep 2022 14:02:25 +0800 Subject: [PATCH] refactor(nc-gui): remove unused code + style a bit --- .../nc-gui/components/smartsheet/Kanban.vue | 65 ++----------------- 1 file changed, 6 insertions(+), 59 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/Kanban.vue b/packages/nc-gui/components/smartsheet/Kanban.vue index e4edaf28f8..368e31806e 100644 --- a/packages/nc-gui/components/smartsheet/Kanban.vue +++ b/packages/nc-gui/components/smartsheet/Kanban.vue @@ -18,10 +18,6 @@ import { import Row from '~/components/smartsheet/Row.vue' import type { Row as RowType } from '~/composables' -interface Attachment { - url: string -} - const meta = inject(MetaInj) const view = inject(ActiveViewInj) @@ -68,16 +64,6 @@ provide(ReadonlyInj, !isUIAllowed('xcDatatableEditable')) const fields = inject(FieldsInj, ref([])) -const fieldsWithoutCover = computed(() => fields.value.filter((f) => f.id !== kanbanMetaData.value?.fk_cover_image_col_id)) - -// const coverImageColumn: any = $( -// computed(() => -// meta?.value.columnsById -// ? meta.value.columnsById[kanbanData.value?.fk_cover_image_col_id as keyof typeof meta.value.columnsById] -// : {}, -// ), -// ) - watch( [meta, view], async () => { @@ -96,23 +82,9 @@ const isRowEmpty = (record: any, col: any) => { return Array.isArray(val) && val.length === 0 } -// const attachments = (record: any): Array => { -// try { -// return coverImageColumn?.title && record.row[coverImageColumn.title] ? JSON.parse(record.row[coverImageColumn.title]) : [] -// } catch (e) { -// return [] -// } -// } - -const reloadAttachments = ref(false) - reloadViewDataHook?.on(async () => { await loadKanbanMeta() await loadKanbanData() - reloadAttachments.value = true - nextTick(() => { - reloadAttachments.value = false - }) }) const expandForm = (row: RowType, state?: Record) => { @@ -235,9 +207,11 @@ openNewRecordFormHook?.on(async (stackTitle) => {
-
+
{{ stack.title }} - + + +