fix(aihr): keep interview record fallback honest
This commit is contained in:
@@ -13,6 +13,15 @@
|
||||
</div>
|
||||
</section>
|
||||
|
||||
<el-alert
|
||||
v-if="recordsFallback"
|
||||
class="demo-data-alert"
|
||||
title="面试记录接口暂不可用,当前显示演示记录,不代表真实面试数据"
|
||||
type="warning"
|
||||
:closable="false"
|
||||
show-icon
|
||||
/>
|
||||
|
||||
<section class="flow-strip">
|
||||
<div v-for="step in flowSteps" :key="step.title" class="flow-step" :class="{ active: step.active, done: step.done }">
|
||||
<span>{{ step.index }}</span>
|
||||
@@ -473,6 +482,7 @@ const apiQuestions = ref<InterviewQuestion[]>([]);
|
||||
const apiScoreResult = ref<CandidateSeed['scoreResult'] | null>(null);
|
||||
const answers = reactive<Record<string, string>>({});
|
||||
const records = ref<InterviewRecord[]>([...baseRecords]);
|
||||
const recordsFallback = ref(false);
|
||||
const interviewReviewVisible = ref(false);
|
||||
const interviewReviewSaving = ref(false);
|
||||
const reviewingRecord = ref<InterviewRecord | null>(null);
|
||||
@@ -672,9 +682,11 @@ const questionPillClass = (question: InterviewQuestion) => {
|
||||
const loadInterviewRecords = async () => {
|
||||
try {
|
||||
const { data } = await listInterviewRecords(20);
|
||||
records.value = data?.length ? data : [...baseRecords];
|
||||
records.value = data ?? [];
|
||||
recordsFallback.value = false;
|
||||
} catch {
|
||||
records.value = [...baseRecords];
|
||||
recordsFallback.value = true;
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user