fix: 性別

This commit is contained in:
skytek_xinliang
2026-08-31 14:27:18 +08:00
parent bea7d88f0c
commit 403d6eaa0e
+14 -1
View File
@@ -7,7 +7,7 @@
<v-row class="mt-4" no-gutters> <v-row class="mt-4" no-gutters>
<v-col cols="8"> <v-col cols="8">
<v-card-title> <v-card-title>
{{ store.userProfile.name || "市民" }} 先生 {{ displayUserName }}
</v-card-title> </v-card-title>
<v-card-subtitle> <v-card-subtitle>
資料更新於 {{ todayTimeString }} 資料更新於 {{ todayTimeString }}
@@ -291,6 +291,19 @@ const courseStore = useCourseStore();
const router = useRouter(); const router = useRouter();
const missingGroupDialog = ref(false); const missingGroupDialog = ref(false);
const displayUserName = computed(() => {
const name = store.userProfile.name || "市民";
const gender = store.userProfile.gender;
const honorific =
gender === "男" || gender === "male"
? "先生"
: gender === "女" || gender === "female"
? "女士"
: "";
return honorific ? `${name} ${honorific}` : name;
});
const MISSING_GROUP_DIALOG_KEY = "missing-fitness-group-dialog-shown"; const MISSING_GROUP_DIALOG_KEY = "missing-fitness-group-dialog-shown";
function hasShownMissingGroupDialog() { function hasShownMissingGroupDialog() {