|
|
@ -15,14 +15,24 @@ import MdiViewListIcon from '~icons/mdi/view-list-outline' |
|
|
|
|
|
|
|
|
|
|
|
// todo : replace with inject |
|
|
|
// todo : replace with inject |
|
|
|
const publicViewId = null |
|
|
|
const publicViewId = null |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// TODO:: identify based on meta |
|
|
|
|
|
|
|
const isView = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
|
|
const { project } = useProject() |
|
|
|
const { project } = useProject() |
|
|
|
|
|
|
|
|
|
|
|
const { $api } = useNuxtApp() |
|
|
|
const { $api } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
|
|
const toast = useToast() |
|
|
|
const toast = useToast() |
|
|
|
|
|
|
|
|
|
|
|
const meta = inject(MetaInj) |
|
|
|
const meta = inject(MetaInj) |
|
|
|
|
|
|
|
|
|
|
|
const selectedView = inject(ActiveViewInj) |
|
|
|
const selectedView = inject(ActiveViewInj) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const showWebhookDrawer = ref(false) |
|
|
|
|
|
|
|
|
|
|
|
const exportCsv = async () => { |
|
|
|
const exportCsv = async () => { |
|
|
|
let offset = 0 |
|
|
|
let offset = 0 |
|
|
|
let c = 1 |
|
|
|
let c = 1 |
|
|
@ -80,7 +90,7 @@ const exportCsv = async () => { |
|
|
|
toast.success('Successfully exported all table data') |
|
|
|
toast.success('Successfully exported all table data') |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} catch (e) { |
|
|
|
} catch (e: any) { |
|
|
|
toast.error(extractSdkResponseErrorMsg(e)) |
|
|
|
toast.error(extractSdkResponseErrorMsg(e)) |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -99,22 +109,37 @@ const exportCsv = async () => { |
|
|
|
<template #overlay> |
|
|
|
<template #overlay> |
|
|
|
<div class="bg-white shadow"> |
|
|
|
<div class="bg-white shadow"> |
|
|
|
<div> |
|
|
|
<div> |
|
|
|
<div class="nc-menu-item" @click.stop="exportCsv"> |
|
|
|
<div |
|
|
|
|
|
|
|
v-if="isUIAllowed('csvImport') && !isView" |
|
|
|
|
|
|
|
v-t="['a:actions:upload-csv']" |
|
|
|
|
|
|
|
class="nc-menu-item" |
|
|
|
|
|
|
|
@click.stop="exportCsv" |
|
|
|
|
|
|
|
> |
|
|
|
<MdiDownloadIcon /> |
|
|
|
<MdiDownloadIcon /> |
|
|
|
<!-- Download as CSV --> |
|
|
|
<!-- Download as CSV --> |
|
|
|
{{ $t('activity.downloadCSV') }} |
|
|
|
{{ $t('activity.downloadCSV') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="nc-menu-item" @click.stop> |
|
|
|
<div v-if="isUIAllowed('csvImport') && !isView" v-t="['a:actions:upload-csv']" class="nc-menu-item" @click.stop> |
|
|
|
<MdiUploadIcon /> |
|
|
|
<MdiUploadIcon /> |
|
|
|
<!-- Upload CSV --> |
|
|
|
<!-- Upload CSV --> |
|
|
|
{{ $t('activity.uploadCSV') }} |
|
|
|
{{ $t('activity.uploadCSV') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="nc-menu-item" @click.stop> |
|
|
|
<div |
|
|
|
|
|
|
|
v-if="isUIAllowed('SharedViewList') && !isView" |
|
|
|
|
|
|
|
v-t="['a:actions:shared-view-list']" |
|
|
|
|
|
|
|
class="nc-menu-item" |
|
|
|
|
|
|
|
@click.stop |
|
|
|
|
|
|
|
> |
|
|
|
<MdiViewListIcon /> |
|
|
|
<MdiViewListIcon /> |
|
|
|
<!-- Shared View List --> |
|
|
|
<!-- Shared View List --> |
|
|
|
{{ $t('activity.listSharedView') }} |
|
|
|
{{ $t('activity.listSharedView') }} |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="nc-menu-item" @click.stop> |
|
|
|
<div |
|
|
|
|
|
|
|
v-if="isUIAllowed('webhook') && !isView" |
|
|
|
|
|
|
|
v-t="['c:actions:webhook']" |
|
|
|
|
|
|
|
class="nc-menu-item" |
|
|
|
|
|
|
|
@click.stop="showWebhookDrawer = true" |
|
|
|
|
|
|
|
> |
|
|
|
<MdiHookIcon /> |
|
|
|
<MdiHookIcon /> |
|
|
|
<!-- todo: i18n --> |
|
|
|
<!-- todo: i18n --> |
|
|
|
Webhook |
|
|
|
Webhook |
|
|
@ -123,4 +148,5 @@ const exportCsv = async () => { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</a-dropdown> |
|
|
|
</a-dropdown> |
|
|
|
|
|
|
|
<WebhookDrawer v-if="showWebhookDrawer" v-model="showWebhookDrawer" /> |
|
|
|
</template> |
|
|
|
</template> |
|
|
|