保誠-保戶業務員媒合平台
Tomas
2021-12-10 3b2586dc9499e16919a8a333b3b78c2ca792d416
fixed: Consultant 型別錯誤
修改2個檔案
17 ■■■■■ 已變更過的檔案
PAMapp/assets/ts/models/consultant.model.ts 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/components/Consultant/ConsultantCard.vue 13 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
PAMapp/assets/ts/models/consultant.model.ts
@@ -5,8 +5,8 @@
    expertise          : string[];
    avgScore           : number;
    contactStatus?     : string;
    createTime         : Date;
    updateTime         : Date;
    createTime         : Date | string;
    updateTime         : Date | string;
    role               : string;
    seniority          : string,
    appointments?      : Appointment[];
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 = {