Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Commit c9019fc

Browse files
committed
πŸ› fix: ν”„λ‘œν•„ μ‚¬μš©μžλ³„ κΆŒν•œμ— λ”°λ₯Έ ν‘œμ‹œ 데이터 μˆ˜μ •
1 parent 52ccaf2 commit c9019fc

1 file changed

Lines changed: 21 additions & 7 deletions

File tree

β€Žsrc/pages/Profile/UserProfile.vueβ€Ž

Lines changed: 21 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
<div class="flex justify-between items-center mb-6 border-b border-gray-200 pb-4">
1010
<h2 class="text-xl font-bold text-text-heading">ν”„λ‘œν•„</h2>
1111
<button
12+
v-if="user.userInfo?.role_type === 'student'"
1213
@click="studentScoreInputForm"
1314
:class="[
1415
'px-4 py-2 rounded-base text-sm font-medium transition-colors duration-200',
@@ -30,15 +31,26 @@
3031
<p class="text-lg font-semibold text-text-heading text-center">
3132
{{ user.userInfo?.name }}
3233
</p>
33-
<p class="text-sm text-text-muted text-center mb-4">{{ user.userInfo?.user_id }}</p>
34+
<p
35+
v-if="user.userInfo?.role_type === 'student'"
36+
class="text-sm text-text-muted text-center mb-4"
37+
>
38+
{{ user.userInfo?.user_id }}
39+
</p>
3440
</div>
3541

3642
<div class="bg-gray-50 rounded-base border border-gray-200 p-4 mb-6">
37-
<div class="flex justify-between items-center py-3 border-b border-gray-200">
43+
<div
44+
v-if="user.userInfo?.role_type === 'student'"
45+
class="flex justify-between items-center py-3 border-b border-gray-200"
46+
>
3847
<span class="text-sm font-medium text-text-muted">ν•™λ²ˆ</span>
3948
<span class="text-sm text-text-base">{{ user.userInfo?.user_id }}</span>
4049
</div>
41-
<div class="flex justify-between items-center py-3 border-b border-gray-200">
50+
<div
51+
v-if="user.userInfo?.role_type === 'student'"
52+
class="flex justify-between items-center py-3 border-b border-gray-200"
53+
>
4254
<span class="text-sm font-medium text-text-muted">ν•™λ…„</span>
4355
<span class="text-sm text-text-base">{{ user.userInfo?.grade_id + 'ν•™λ…„' }}</span>
4456
</div>
@@ -196,10 +208,12 @@ const gradeInput = reactive({
196208
})
197209
198210
onMounted(async () => {
199-
try {
200-
userGrade.value = await getUserGrade()
201-
} catch (error) {
202-
console.log('성적 정보λ₯Ό λΆˆλŸ¬μ˜€μ§€ λͺ»ν–ˆμŠ΅λ‹ˆλ‹€.', error)
211+
if (user.userInfo.role_type === 'stuendt') {
212+
try {
213+
userGrade.value = await getUserGrade()
214+
} catch (error) {
215+
console.log('성적 정보λ₯Ό λΆˆλŸ¬μ˜€μ§€ λͺ»ν–ˆμŠ΅λ‹ˆλ‹€.', error)
216+
}
203217
}
204218
})
205219

0 commit comments

Comments
Β (0)