fix: perms for inbox card

This commit is contained in:
Shivam Mishra
2025-01-23 10:00:04 +05:30
parent a898266ae5
commit ed44fc77e1
2 changed files with 15 additions and 20 deletions
@@ -6,6 +6,7 @@ import { useI18n } from 'vue-i18n';
import CardLayout from 'dashboard/components-next/CardLayout.vue';
import DropdownMenu from 'dashboard/components-next/dropdown-menu/DropdownMenu.vue';
import Button from 'dashboard/components-next/button/Button.vue';
import Policy from 'dashboard/components/policy.vue';
import { INBOX_TYPES, getInboxIconByType } from 'dashboard/helper/inbox';
const props = defineProps({
@@ -76,8 +77,9 @@ const handleAction = ({ action, value }) => {
{{ inboxName }}
</span>
<div class="flex items-center gap-2">
<div
<Policy
v-on-clickaway="() => toggleDropdown(false)"
:permissions="['administrator']"
class="relative flex items-center group"
>
<Button
@@ -93,7 +95,7 @@ const handleAction = ({ action, value }) => {
class="mt-1 ltr:right-0 rtl:left-0 top-full"
@action="handleAction($event)"
/>
</div>
</Policy>
</div>
</div>
</CardLayout>