From 7f818d059990aa4d1a24945c173e9adce6d7adf8 Mon Sep 17 00:00:00 2001 From: Pranav C Date: Thu, 4 Aug 2022 00:12:46 +0530 Subject: [PATCH] refactor(gui-v2): label correction Signed-off-by: Pranav C --- .../nc-gui-v2/components/virtual-cell/HasMany.vue | 2 +- .../components/virtual-cell/ManyToMany.vue | 5 ++--- .../virtual-cell/components/ListChildItems.vue | 15 +++------------ .../virtual-cell/components/ListItems.vue | 13 +++++++++---- packages/nc-gui-v2/composables/useLTARStore.ts | 2 +- 5 files changed, 16 insertions(+), 21 deletions(-) diff --git a/packages/nc-gui-v2/components/virtual-cell/HasMany.vue b/packages/nc-gui-v2/components/virtual-cell/HasMany.vue index 573bf6cd24..f8f21c4424 100644 --- a/packages/nc-gui-v2/components/virtual-cell/HasMany.vue +++ b/packages/nc-gui-v2/components/virtual-cell/HasMany.vue @@ -40,7 +40,7 @@ await loadRelatedTableMeta() - + diff --git a/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue b/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue index 0117aa220c..1fa74d90e3 100644 --- a/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue +++ b/packages/nc-gui-v2/components/virtual-cell/ManyToMany.vue @@ -32,8 +32,7 @@ await loadRelatedTableMeta()
@@ -41,7 +40,7 @@ await loadRelatedTableMeta()
- + diff --git a/packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue b/packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue index eb5b943225..8cc5d65701 100644 --- a/packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue +++ b/packages/nc-gui-v2/components/virtual-cell/components/ListChildItems.vue @@ -10,15 +10,7 @@ const emit = defineEmits(['update:modelValue', 'attachRecord']) const vModel = useVModel(props, 'modelValue', emit) -const { - childrenList, - meta, - deleteRelatedRow, - loadChildrenList, - childrenListPagination, - relatedTablePrimaryValueProp, - unlink, -} = +const { childrenList, meta, deleteRelatedRow, loadChildrenList, childrenListPagination, relatedTablePrimaryValueProp, unlink } = useLTARStoreOrThrow() watch(vModel, () => { @@ -56,8 +48,7 @@ const unlinkRow = async (row: Record) => {
- +
@@ -72,7 +63,7 @@ const unlinkRow = async (row: Record) => { show-less-items /> - + diff --git a/packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue b/packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue index f992a86cd9..5eee128ca7 100644 --- a/packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue +++ b/packages/nc-gui-v2/components/virtual-cell/components/ListItems.vue @@ -20,16 +20,21 @@ watch(vModel, () => { const linkRow = async (row: Record) => { await link(row) - vModel.value= false + vModel.value = false // await loadChildrenExcludedList() } - + diff --git a/packages/nc-gui-v2/composables/useLTARStore.ts b/packages/nc-gui-v2/composables/useLTARStore.ts index a9c9d3c4b8..a197be18e1 100644 --- a/packages/nc-gui-v2/composables/useLTARStore.ts +++ b/packages/nc-gui-v2/composables/useLTARStore.ts @@ -110,7 +110,7 @@ const [useProvideLTARStore, useLTARStore] = useInjectionState( $api.dbTableRow.delete(NOCO, project.value.id as string, relatedTableMeta.value.id as string, id as string) reloadData?.() await loadChildrenList() - } catch (e) { + } catch (e: any) { notification.error(await extractSdkResponseErrorMsg(e)) } },