保誠-保戶業務員媒合平台
Tomas
2022-02-16 abfa3cc46bfd161b6a474610f37a5243a6ca34e8
PAMapp/pages/myConsultantList.vue
@@ -76,7 +76,7 @@
    // format consultant list
      this.consultantList = (this.myConsultantList || [])
        .filter(item => item.contactStatus === 'picked' || item.contactStatus === 'reserved')
        .filter(item => item.contactStatus !== 'contacted')
        .map((item) => ({ ...item, formatDate: new Date(item.updateTime || item.createTime)}))
        .sort((preItem, nextItem) => +nextItem.formatDate - +preItem.formatDate );
@@ -90,14 +90,15 @@
                appointmentDate: appointment.appointmentDate,
                appointmentScore: appointment.satisfactionScore,
                appointmentStatus: appointment.communicateStatus,
                appointmentLastModifiedDate: appointment.lastModifiedDate
              };
              this.contactedList.push(consultantWithAppointmentId);
            })
          });
        this.contactedList = this.contactedList
          .filter((appointment) => appointment['appointmentStatus'] === 'contacted' || appointment['appointmentStatus'] === 'closed' || appointment['appointmentStatus'] === 'done')
          .map((appointment) => ({ ...appointment, sortTime: new Date(appointment.appointmentDate)}))
          .filter((appointment) => appointment['appointmentStatus'] !== 'reserved')
          .map((appointment) => ({ ...appointment, sortTime: new Date(appointment.updateTime)}))
          .sort((preAppointment, nextAppointment) => +nextAppointment.sortTime - +preAppointment.sortTime);
      }