hide actions and pages in the frontend according to permissions

This commit is contained in:
Gregor Vostrak
2024-04-25 04:12:10 +02:00
parent 77cedb160e
commit f22d423fff
21 changed files with 176 additions and 18 deletions

View File

@@ -2,6 +2,7 @@
import Dropdown from '@/Components/Dropdown.vue';
import { TrashIcon } from '@heroicons/vue/20/solid';
import type { Client } from '@/utils/api';
import { canDeleteClients } from '@/utils/permissions';
const emit = defineEmits<{
delete: [];
@@ -31,6 +32,7 @@ const props = defineProps<{
</template>
<template #content>
<button
v-if="canDeleteClients()"
@click="emit('delete')"
:aria-label="'Delete Client ' + props.client.name"
data-testid="client_delete"