From 401c8408701df352c79a7af2cce7bfd452f3abef Mon Sep 17 00:00:00 2001 From: Muhammed Mustafa Date: Thu, 23 Nov 2023 07:02:56 +0000 Subject: [PATCH] fix: Disabled view rename if view is locked --- .../smartsheet/toolbar/ViewActionMenu.vue | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue b/packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue index 087205e9dc..7616aaf08e 100644 --- a/packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue +++ b/packages/nc-gui/components/smartsheet/toolbar/ViewActionMenu.vue @@ -26,7 +26,7 @@ const view = computed(() => props.view) const table = computed(() => props.table) -const { viewsByTable, isActiveViewLocked: isLocked } = storeToRefs(useViewsStore()) +const { viewsByTable } = storeToRefs(useViewsStore()) const { loadViews, navigateToView } = useViewsStore() const { base } = storeToRefs(useBase()) @@ -56,7 +56,7 @@ const quickImportDialogs: Record<(typeof quickImportDialogTypes)[number], Ref> const onImportClick = (dialog: any) => { - if (isLocked.value) return + if (lockType.value === LockType.Locked) return emits('closeModal') dialog.value = true @@ -161,10 +161,17 @@ const onDelete = async () => {