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