From 3b2586dc9499e16919a8a333b3b78c2ca792d416 Mon Sep 17 00:00:00 2001 From: Tomas <tomasysh@gmail.com> Date: 星期五, 10 十二月 2021 10:05:38 +0800 Subject: [PATCH] fixed: Consultant 型別錯誤 --- PAMapp/components/Consultant/ConsultantCard.vue | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/PAMapp/components/Consultant/ConsultantCard.vue b/PAMapp/components/Consultant/ConsultantCard.vue index 2e7937e..7348481 100644 --- a/PAMapp/components/Consultant/ConsultantCard.vue +++ b/PAMapp/components/Consultant/ConsultantCard.vue @@ -181,19 +181,22 @@ .sort((preAppointment, nextAppointment) => +nextAppointment.sortDate - +preAppointment.sortDate)[0]; } get displayTime(): string { - let time = ''; + let time: Date | string = ''; switch(this.agentInfo.contactStatus) { case 'reserved': - time = this.agentInfo.updateTime + time = this.agentInfo.updateTime break; case 'contacted': - time = this.agentInfo.updateTime + time = this.agentInfo.updateTime break; case 'picked': - time = this.agentInfo.createTime + time = this.agentInfo.createTime break; } - return time; + if (typeof time !== 'string') { + time.toString(); + } + return time as string; } appointmentDetail: any = { -- Gitblit v1.8.0