| | |
| | | |
| | | // 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 ); |
| | | |
| | |
| | | }); |
| | | |
| | | this.contactedList = this.contactedList |
| | | .filter((appointment) => appointment['appointmentStatus'] === 'contacted' || appointment['appointmentStatus'] === 'closed' || appointment['appointmentStatus'] === 'done') |
| | | .filter((appointment) => appointment['appointmentStatus'] !== 'reserved') |
| | | .map((appointment) => ({ ...appointment, sortTime: new Date(appointment.appointmentDate)})) |
| | | .sort((preAppointment, nextAppointment) => +nextAppointment.sortTime - +preAppointment.sortTime); |
| | | } |