|
|
|
@ -11,7 +11,10 @@ const emits = defineEmits<Emits>()
|
|
|
|
|
|
|
|
|
|
const { $e } = useNuxtApp() |
|
|
|
|
|
|
|
|
|
const { isUIAllowed } = useUIPermission() |
|
|
|
|
|
|
|
|
|
const isView = ref(false) |
|
|
|
|
|
|
|
|
|
let showApiSnippet = $ref(false) |
|
|
|
|
|
|
|
|
|
const showWebhookDrawer = ref(false) |
|
|
|
@ -33,6 +36,7 @@ function onOpenModal(type: ViewTypes, title = '') {
|
|
|
|
|
|
|
|
|
|
<template> |
|
|
|
|
<a-menu :selected-keys="[]" class="flex-1 flex flex-col"> |
|
|
|
|
<div v-if="isUIAllowed('virtualViewsCreateOrEdit')"> |
|
|
|
|
<h3 class="px-3 py-1 text-xs font-semibold flex items-center gap-4 text-gray-500"> |
|
|
|
|
{{ $t('activity.createView') }} |
|
|
|
|
</h3> |
|
|
|
@ -73,7 +77,12 @@ function onOpenModal(type: ViewTypes, title = '') {
|
|
|
|
|
</a-tooltip> |
|
|
|
|
</a-menu-item> |
|
|
|
|
|
|
|
|
|
<a-menu-item v-if="!isView" key="form" class="group !flex !items-center !my-0 !h-[30px]" @click="onOpenModal(ViewTypes.FORM)"> |
|
|
|
|
<a-menu-item |
|
|
|
|
v-if="!isView" |
|
|
|
|
key="form" |
|
|
|
|
class="group !flex !items-center !my-0 !h-[30px]" |
|
|
|
|
@click="onOpenModal(ViewTypes.FORM)" |
|
|
|
|
> |
|
|
|
|
<a-tooltip placement="left"> |
|
|
|
|
<template #title> |
|
|
|
|
{{ $t('msg.info.addView.form') }} |
|
|
|
@ -90,10 +99,13 @@ function onOpenModal(type: ViewTypes, title = '') {
|
|
|
|
|
</div> |
|
|
|
|
</a-tooltip> |
|
|
|
|
</a-menu-item> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<SmartsheetSidebarMenuApiSnippet v-model="showApiSnippet" /> |
|
|
|
|
|
|
|
|
|
<div class="flex-auto justify-end flex flex-col gap-4 mt-4"> |
|
|
|
|
<button |
|
|
|
|
v-if="isUIAllowed('virtualViewsCreateOrEdit')" |
|
|
|
|
class="flex items-center gap-2 w-full mx-3 px-4 py-3 rounded border transform translate-x-4 hover:(translate-x-0 shadow-lg) transition duration-150 ease !text-xs" |
|
|
|
|
@click="onWebhooks" |
|
|
|
|
> |
|
|
|
|