hide create project buttons and modal depending on the permission

This commit is contained in:
Gregor Vostrak
2024-10-28 13:37:39 +01:00
parent eb4debe481
commit cd7573dcf1
11 changed files with 29 additions and 2 deletions

View File

@@ -64,6 +64,7 @@ const props = withDefaults(
emptyPlaceholder: string;
allowReset: boolean;
enableEstimatedTime: boolean;
canCreateProject: boolean;
}>(),
{
showBadgeBorder: true,
@@ -532,7 +533,7 @@ const showCreateProject = ref(false);
</script>
<template>
<div v-if="projects.length === 0">
<div v-if="projects.length === 0 && canCreateProject">
<Badge
@click="showCreateProject = true"
size="large"
@@ -689,7 +690,9 @@ const showCreateProject = ref(false);
</template>
</template>
</div>
<div class="hover:bg-card-background-active rounded-b-lg">
<div
v-if="canCreateProject"
class="hover:bg-card-background-active rounded-b-lg">
<button
@click="
open = false;