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

Loading…
Cancel
Save