fix: 移除未登入自評
This commit is contained in:
@@ -113,7 +113,7 @@
|
|||||||
/> -->
|
/> -->
|
||||||
|
|
||||||
<v-list-item
|
<v-list-item
|
||||||
v-if="SELF_ASSESSMENT_ENABLED"
|
v-if="SELF_ASSESSMENT_ENABLED && store.isLoggedIn"
|
||||||
color="primary"
|
color="primary"
|
||||||
prepend-icon="mdi-clipboard-text-search"
|
prepend-icon="mdi-clipboard-text-search"
|
||||||
title="自評"
|
title="自評"
|
||||||
@@ -222,7 +222,7 @@
|
|||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<v-btn
|
<v-btn
|
||||||
v-if="SELF_ASSESSMENT_ENABLED"
|
v-if="SELF_ASSESSMENT_ENABLED && store.isLoggedIn"
|
||||||
to="/self-assessment"
|
to="/self-assessment"
|
||||||
value="self-assessment"
|
value="self-assessment"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -172,35 +172,6 @@
|
|||||||
|
|
||||||
<v-card class="rounded-xl elevation-2 mb-4 py-4" color="surface">
|
<v-card class="rounded-xl elevation-2 mb-4 py-4" color="surface">
|
||||||
<v-card-text>
|
<v-card-text>
|
||||||
<template v-if="SELF_ASSESSMENT_ENABLED">
|
|
||||||
<div class="d-flex align-center mb-4">
|
|
||||||
<v-avatar class="mr-4 text-white" color="accent" size="36">
|
|
||||||
<v-icon icon="mdi-clipboard-text-outline" />
|
|
||||||
</v-avatar>
|
|
||||||
|
|
||||||
<div class="text-left">
|
|
||||||
<div class="text-title-medium font-weight-bold text-primary">
|
|
||||||
無須登入,先做線上自評
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="text-title-small text-grey mt-2">
|
|
||||||
約 3 分鐘完成,取得初步健康風險分級。
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<v-btn
|
|
||||||
block
|
|
||||||
class="rounded-lg font-weight-bold elevation-1 mb-3"
|
|
||||||
color="secondary"
|
|
||||||
prepend-icon="mdi-clipboard-text-search"
|
|
||||||
to="/self-assessment"
|
|
||||||
variant="flat"
|
|
||||||
>
|
|
||||||
開始自評
|
|
||||||
</v-btn>
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<v-row density="compact">
|
<v-row density="compact">
|
||||||
<v-col cols="12" md="6">
|
<v-col cols="12" md="6">
|
||||||
<v-btn
|
<v-btn
|
||||||
@@ -388,7 +359,6 @@ import {
|
|||||||
BODY_COMPOSITION_ENABLED,
|
BODY_COMPOSITION_ENABLED,
|
||||||
CHECKIN_ENABLED,
|
CHECKIN_ENABLED,
|
||||||
RADAR_ENABLED,
|
RADAR_ENABLED,
|
||||||
SELF_ASSESSMENT_ENABLED,
|
|
||||||
} from "@/config/features";
|
} from "@/config/features";
|
||||||
import { useAppStore } from "@/stores/app";
|
import { useAppStore } from "@/stores/app";
|
||||||
import { useCourseStore } from "@/stores/course";
|
import { useCourseStore } from "@/stores/course";
|
||||||
|
|||||||
@@ -86,18 +86,6 @@
|
|||||||
>
|
>
|
||||||
註冊新帳號
|
註冊新帳號
|
||||||
</v-btn>
|
</v-btn>
|
||||||
|
|
||||||
<v-btn
|
|
||||||
v-if="SELF_ASSESSMENT_ENABLED"
|
|
||||||
block
|
|
||||||
class="rounded-lg font-weight-bold"
|
|
||||||
color="primary"
|
|
||||||
prepend-icon="mdi-clipboard-text-search"
|
|
||||||
to="/self-assessment"
|
|
||||||
variant="outlined"
|
|
||||||
>
|
|
||||||
不登入,先做線上自評
|
|
||||||
</v-btn>
|
|
||||||
</v-form>
|
</v-form>
|
||||||
<!-- <div class="d-flex align-center justify-center my-4">
|
<!-- <div class="d-flex align-center justify-center my-4">
|
||||||
<v-divider class="mr-3" />
|
<v-divider class="mr-3" />
|
||||||
@@ -153,7 +141,6 @@ import {
|
|||||||
isUnregisteredPhoneError,
|
isUnregisteredPhoneError,
|
||||||
} from "@/utils/api-error";
|
} from "@/utils/api-error";
|
||||||
import { readGuestSelfAssessmentDraft } from "@/utils/guest-self-assessment";
|
import { readGuestSelfAssessmentDraft } from "@/utils/guest-self-assessment";
|
||||||
import { SELF_ASSESSMENT_ENABLED } from "@/config/features";
|
|
||||||
|
|
||||||
const store = useAppStore();
|
const store = useAppStore();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ const router = createRouter({
|
|||||||
path: "/self-assessment",
|
path: "/self-assessment",
|
||||||
name: "self-assessment",
|
name: "self-assessment",
|
||||||
component: SelfAssessment,
|
component: SelfAssessment,
|
||||||
|
meta: { requiresAuth: true },
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
path: "/profile",
|
path: "/profile",
|
||||||
|
|||||||
Reference in New Issue
Block a user