user role client : give access to panel account

This commit is contained in:
isUnknown 2025-01-27 18:22:03 +01:00
parent 8ff30c7f34
commit bcaf287235
7 changed files with 84 additions and 84 deletions

View file

@ -1,8 +1,14 @@
<template>
<main class="flex flex-col" style="--row-gap: var(--space-32)">
<Projects />
<ProjectRequestDialog v-if="isProjectRequestDialogOpen" @close="isProjectRequestDialogOpen = false" />
<ProjectRequestButton @click="isProjectRequestDialogOpen = true" />
<ProjectRequestDialog
v-if="isProjectRequestDialogOpen"
@close="isProjectRequestDialogOpen = false"
/>
<ProjectRequestButton
v-if="user.role === 'client'"
@click="isProjectRequestDialogOpen = true"
/>
</main>
</template>
@ -11,6 +17,8 @@ import Projects from "../components/Projects.vue";
import ProjectRequestButton from "../components/ProjectRequestButton.vue";
import ProjectRequestDialog from "../components/ProjectRequestDialog.vue";
import { ref } from "vue";
import { useUserStore } from "../stores/user";
const isProjectRequestDialogOpen = ref(false);
const { user } = useUserStore();
</script>