Skip to content

Commit

Permalink
feat: add menu option to manage accounts depending on the account type (
Browse files Browse the repository at this point in the history
  • Loading branch information
aloisio-m-bastian authored Nov 6, 2024
1 parent b3ceeb9 commit 6ab1887
Showing 1 changed file with 24 additions and 1 deletion.
25 changes: 24 additions & 1 deletion src/templates/profile-block/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@

<script setup>
import { useAccountStore } from '@/stores/account'
import { computed, inject, ref, watch } from 'vue'
import { computed, inject, ref, watch, onBeforeMount } from 'vue'
import { storeToRefs } from 'pinia'
import Avatar from 'primevue/avatar'
import PrimeButton from 'primevue/button'
Expand All @@ -309,6 +309,29 @@
const { hasAccessToSSOManagement } = storeToRefs(useAccountStore())
const setTheme = useAccountStore().setTheme
onBeforeMount(() => {
switch (user.kind) {
case 'brand':
profileMenuDefault.push({
label: 'Resellers Management',
to: '/resellers'
})
break
case 'company':
profileMenuDefault.push({
label: 'Groups Management',
to: '/groups'
})
break
case 'reseller':
profileMenuDefault.push({
label: 'Clients Management',
to: '/clients'
})
break
}
})
const profile = ref(null)
const showProfile = ref(false)
const profileMenuDefault = [
Expand Down

0 comments on commit 6ab1887

Please sign in to comment.