From f247f8a4ee7edda57d01b184962b3a3ec04316a7 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 30 四月 2024 15:01:55 +0800 Subject: [PATCH] move node_modules/element-ui to local_modules/element-ui --- PAMapp/components/Client/ClientCard.vue | 34 ++++++++++++++++++++++------------ 1 files changed, 22 insertions(+), 12 deletions(-) diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue index 70510bf..5889940 100644 --- a/PAMapp/components/Client/ClientCard.vue +++ b/PAMapp/components/Client/ClientCard.vue @@ -54,7 +54,6 @@ ></el-avatar> <div class="satisfaction" v-if="!hideReviews"> <template v-if="client.satisfactionScore"> - TODO:���遛��漲 <i class="icon-star pam-icon icon--yellow satisfaction"></i> <span>{{client.satisfactionScore}}</span> </template> @@ -78,12 +77,12 @@ v-else-if="client.communicateStatus === contactStatus.CONTACTED"> 蝯�� </div> - <div + <!-- <div class="invite-msg smTxt_bold" @click.stop="inviteReview" v-else-if="!client.satisfactionScore"> ��遛��漲 - </div> + </div> --> <div class="date xsTxt text--black" @@ -119,7 +118,8 @@ <p>�批嚗�<span>{{gender}}</span></p> <p>撟湧翩嚗�<span>{{client.age | toAgeLabel }}</span></p> <p>�璆哨��<span>{{client.job}}</span></p> - <p>��瘙��<span>{{client.requirement.split(',').join('��')}}</span></p> + <p>隢株岷�撘��<span>{{client.consultationMethod | toConsultationMethod }}</span></p> + <p>��瘙��<span>{{ client.requirement ? client.requirement.split(',').join('��') : '--' }}</span></p> <p v-for="(item, index) in hopeContactTime" :key="index" >��蝯⊥�挾{{index + 1 | formatNumber}}嚗�<span>{{ item | formatHopeContactTime}}</span></p> @@ -306,14 +306,24 @@ this.clearAppointmentIdFromMsg(); } - private readAppointment(): void { - appointmentService.recordRead(this.client.id).then((_) => { - const updatedClient = {...this.client}; - updatedClient.consultantReadTime = new Date().toString(); - this.updateMyAppointmentList(updatedClient); - this.updateAppointmentDetail(this.client.id); - }); + private async readAppointment(): Promise<void> { + try { + const response = await appointmentService.recordRead(this.client.id); + if (response !== null) { + const updatedClient = { ...this.client }; + updatedClient.consultantReadTime = new Date().toString(); + this.updateMyAppointmentList(updatedClient); + this.updateAppointmentDetail(this.client.id); + } else { + throw new Error('appointmentService.recordRead returned null-like value.'); + } + } catch (error) { + console.error('An error occurred while reading appointment:', error); + // �隞亙甇方���隤斗����身�� + throw error; } + } + private clearAppointmentIdFromMsg() { this.storageClearAppointmentIdFromMsg(); @@ -383,7 +393,7 @@ } get requirements() { - return this.client.requirement.split(','); + return this.client.requirement ? this.client.requirement.split(',') : []; } get gender() { -- Gitblit v1.8.0