@@ -49,7 +49,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
import { ref } from 'vue'
|
import { computed, ref } from 'vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
import { useUIStore } from '@/store/ui'
|
import { useUIStore } from '@/store/ui'
|
||||||
import { gallery } from '@/utils/gallery'
|
import { gallery } from '@/utils/gallery'
|
||||||
@@ -65,7 +65,7 @@ defineProps({
|
|||||||
|
|
||||||
const ui = useUIStore()
|
const ui = useUIStore()
|
||||||
const router = useRouter()
|
const router = useRouter()
|
||||||
const { clearSession } = useAuth()
|
const { role, clearSession } = useAuth()
|
||||||
const logoutMutation = useLogoutMutation()
|
const logoutMutation = useLogoutMutation()
|
||||||
|
|
||||||
const logo = gallery.authLogo
|
const logo = gallery.authLogo
|
||||||
@@ -98,8 +98,10 @@ const onLogout = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const userMenuItems = [
|
const userMenuItems = computed(() => [
|
||||||
{ key: 'edit-profile', label: 'ویرایش پروفایل', icon: 'pencil', onClick: goEditProfile },
|
...(role.value === 'student'
|
||||||
|
? [{ key: 'edit-profile', label: 'ویرایش پروفایل', icon: 'pencil', onClick: goEditProfile }]
|
||||||
|
: []),
|
||||||
{
|
{
|
||||||
key: 'logout',
|
key: 'logout',
|
||||||
label: 'خروج',
|
label: 'خروج',
|
||||||
@@ -107,7 +109,7 @@ const userMenuItems = [
|
|||||||
color: 'var(--color-primary)',
|
color: 'var(--color-primary)',
|
||||||
onClick: onLogout,
|
onClick: onLogout,
|
||||||
},
|
},
|
||||||
]
|
])
|
||||||
|
|
||||||
const iconList = [
|
const iconList = [
|
||||||
// { icon: 'chat', action: () => {} },
|
// { icon: 'chat', action: () => {} },
|
||||||
|
|||||||
@@ -53,8 +53,6 @@ export const USER_STATUS = Object.freeze({
|
|||||||
export const MARITAL_STATUS = Object.freeze({
|
export const MARITAL_STATUS = Object.freeze({
|
||||||
single: 'مجرد',
|
single: 'مجرد',
|
||||||
married: 'متاهل',
|
married: 'متاهل',
|
||||||
divorced: 'مطلقه',
|
|
||||||
widowed: 'بیوه',
|
|
||||||
})
|
})
|
||||||
|
|
||||||
export const GENDER = Object.freeze({
|
export const GENDER = Object.freeze({
|
||||||
|
|||||||
Reference in New Issue
Block a user