ownership

This commit is contained in:
Julian Krauser 2024-10-07 18:09:18 +02:00
parent 85289069ba
commit d98afa259e
5 changed files with 18 additions and 14 deletions

View file

@ -1,7 +1,10 @@
<template>
<div class="flex flex-col h-fit w-full border border-primary rounded-md">
<div class="bg-primary p-2 text-white flex flex-row justify-between items-center">
<p>{{ user.firstname }} {{ user.lastname }} <small v-if="user.permissions_total.admin">(Admin)</small></p>
<p>
{{ user.firstname }} {{ user.lastname }} <small v-if="user.permissions_total.admin">(Admin)</small
><small v-if="isOwner"> (Owner)</small>
</p>
<div class="flex flex-row">
<RouterLink
v-if="can('update', 'user', 'user')"
@ -62,8 +65,7 @@ export default defineComponent({
user: { type: Object as PropType<UserViewModel>, default: {} },
},
computed: {
...mapState(useAbilityStore, ["can"]),
...mapState(useAbilityStore, ["can"]),
...mapState(useAbilityStore, ["can", "isOwner"]),
},
methods: {
...mapActions(useModalStore, ["openModal"]),