Browse Source

feat(gui-v2): disable csv in locked view

pull/3209/head
Wing-Kam Wong 2 years ago
parent
commit
c966f21f0f
  1. 8
      packages/nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue

8
packages/nc-gui-v2/components/smartsheet-toolbar/MoreActions.vue

@ -7,6 +7,7 @@ import { message } from 'ant-design-vue'
import {
ActiveViewInj,
FieldsInj,
IsLockedInj,
IsPublicInj,
MetaInj,
extractSdkResponseErrorMsg,
@ -35,9 +36,13 @@ const { project } = useProject()
const { $api } = useNuxtApp()
const meta = inject(MetaInj)
const fields = inject(FieldsInj, ref([]))
const selectedView = inject(ActiveViewInj)
const isLocked = inject(IsLockedInj)
const showWebhookDrawer = ref(false)
const quickImportDialog = ref(false)
@ -124,7 +129,8 @@ const exportFile = async (exportType: ExportTypes) => {
v-if="isUIAllowed('csvImport') && !isView && !isPublicView"
v-t="['a:actions:upload-csv']"
class="nc-menu-item"
@click="quickImportDialog = true"
:class="{ disabled: isLocked }"
@click="!isLocked ? (quickImportDialog = true) : {}"
>
<MdiUploadOutline />
<!-- Upload CSV -->

Loading…
Cancel
Save