From b4d6944076f1df6eedaae35c4c2a7072fe988e8a Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期二, 30 四月 2024 15:34:02 +0800 Subject: [PATCH] update: package-lock.json --- PAMapp/components/Client/ClientCard.vue | 26 ++++++++++++++++++-------- 1 files changed, 18 insertions(+), 8 deletions(-) diff --git a/PAMapp/components/Client/ClientCard.vue b/PAMapp/components/Client/ClientCard.vue index 9bcdfe7..5889940 100644 --- a/PAMapp/components/Client/ClientCard.vue +++ b/PAMapp/components/Client/ClientCard.vue @@ -118,7 +118,7 @@ <p>�批嚗�<span>{{gender}}</span></p> <p>撟湧翩嚗�<span>{{client.age | toAgeLabel }}</span></p> <p>�璆哨��<span>{{client.job}}</span></p> - <p>隢株岷�撘��<span>{{client.consultationMethod }}</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" @@ -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(); -- Gitblit v1.8.0