保誠-保戶業務員媒合平台
Tomas
2021-12-16 d7d05104cad9b772fc17216ef12bff95462fc0cd
PAMapp/pages/myConsultantList.vue
@@ -87,18 +87,15 @@
      // format contacted list
        this.myConsultantList.filter((consultant) => consultant.appointments!.length)
          .forEach((consultant) => {
            const hasAppointment = consultant.appointments?.length;
            if (hasAppointment) {
              consultant.appointments!.forEach((appointment) => {
                const consultantWithAppointmentId: ConsultantWithAppointmentId = {
                  ...consultant,
                  appointmentId: appointment.id,
                  appointmentDate: appointment.appointmentDate,
                  appointmentScore: appointment.satisfactionScore
                };
                this.contactedList.push(consultantWithAppointmentId);
              })
            }
            consultant.appointments!.forEach((appointment) => {
              const consultantWithAppointmentId: ConsultantWithAppointmentId = {
                ...consultant,
                appointmentId: appointment.id,
                appointmentDate: appointment.appointmentDate,
                appointmentScore: appointment.satisfactionScore
              };
              this.contactedList.push(consultantWithAppointmentId);
            })
          });
        this.contactedList = this.contactedList