feat(KAN-48): rebuild project access and permission assignment
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
<script setup lang="ts">
|
||||
import { Badge } from '@/components/ui/badge';
|
||||
import { useLocalization } from '@/composables/useLocalization';
|
||||
import { projectPermissionLabels } from '@/types/project-access';
|
||||
|
||||
defineProps<{ permissions: string[]; emptyLabel: string }>();
|
||||
const { t } = useLocalization();
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div class="flex flex-wrap gap-1.5">
|
||||
<template
|
||||
v-for="(label, value) in projectPermissionLabels"
|
||||
:key="value"
|
||||
>
|
||||
<Badge v-if="permissions.includes(value)" variant="secondary">{{
|
||||
t(label)
|
||||
}}</Badge>
|
||||
</template>
|
||||
<span
|
||||
v-if="permissions.length === 0"
|
||||
class="text-muted-foreground text-sm"
|
||||
>{{ emptyLabel }}</span
|
||||
>
|
||||
</div>
|
||||
</template>
|
||||
Reference in New Issue
Block a user