@@ -5,7 +5,7 @@ import type { AllClubs } from '~/types/api/user/all_clubs'
5
5
6
6
const route = useRoute ()
7
7
8
- const isPresident = ref (false )
8
+ const isPresidentOrVicePresident = ref (false )
9
9
10
10
const { data } = await useAsyncData <AllClubs >(' classroomStatuses' , () => {
11
11
return $fetch <AllClubs >(` /api/user/all_clubs ` , {
@@ -14,8 +14,8 @@ const { data } = await useAsyncData<AllClubs>('classroomStatuses', () => {
14
14
})
15
15
})
16
16
17
- if (data .value ?.president .length !== 0 ) {
18
- isPresident .value = true
17
+ if (data .value ?.president .length !== 0 || data . value ?. vice . length !== 0 ) {
18
+ isPresidentOrVicePresident .value = true
19
19
}
20
20
</script >
21
21
@@ -69,14 +69,14 @@ if (data.value?.president.length !== 0) {
69
69
CAS管理
70
70
</h2 >
71
71
<div class =" mt-2" >
72
- <NuxtLink v-if =" isPresident " to =" /manage/reservation" >
72
+ <NuxtLink v-if =" isPresidentOrVicePresident " to =" /manage/reservation" >
73
73
<Button :variant =" route.name === 'manage-reservation' ? 'secondary' : 'ghost'" class =" w-full justify-start" >
74
74
<Icon class =" mr-2 h-4 w-4" name =" material-symbols:calendar-today-outline" />
75
75
预约教室
76
76
</Button >
77
77
</NuxtLink >
78
78
<NuxtLink to =" /manage/manage" >
79
- <Button v-if =" isPresident " :variant =" route.name === 'manage-manage' ? 'secondary' : 'ghost'" class =" w-full justify-start" >
79
+ <Button v-if =" isPresidentOrVicePresident " :variant =" route.name === 'manage-manage' ? 'secondary' : 'ghost'" class =" w-full justify-start" >
80
80
<Icon class =" mr-2 h-4 w-4" name =" material-symbols:calendar-today-outline" />
81
81
管理预约
82
82
</Button >
@@ -88,7 +88,7 @@ if (data.value?.president.length !== 0) {
88
88
</Button >
89
89
</NuxtLink >
90
90
<NuxtLink to =" /manage/record" >
91
- <Button v-if =" isPresident " :variant =" route.name === 'manage-record' ? 'secondary' : 'ghost'" class =" w-full justify-start mt-1" >
91
+ <Button v-if =" isPresidentOrVicePresident " :variant =" route.name === 'manage-record' ? 'secondary' : 'ghost'" class =" w-full justify-start mt-1" >
92
92
<Icon class =" mr-2 h-4 w-4" name =" charm:tick-double" />
93
93
活动记录
94
94
</Button >
0 commit comments