From d4e6cf05333a148f238dd1e4be3862f1197cbe5d Mon Sep 17 00:00:00 2001 From: Mila <Mila@pollex.com.tw> Date: 星期二, 16 十一月 2021 12:05:58 +0800 Subject: [PATCH] update: 我的顧問清單/預約清單: 按照時間排序 --- PAMapp/pages/myAppointmentList.vue | 9 +++++++-- 1 files changed, 7 insertions(+), 2 deletions(-) diff --git a/PAMapp/pages/myAppointmentList.vue b/PAMapp/pages/myAppointmentList.vue index f0d6d6a..aad9709 100644 --- a/PAMapp/pages/myAppointmentList.vue +++ b/PAMapp/pages/myAppointmentList.vue @@ -42,8 +42,13 @@ let clients: ClientInfo[] = []; await getMyAppointmentList().then((res: any) => clients = res.data) - contactedList = clients.filter(item => item.communicateStatus === 'contacted'); - appointmentList = clients.filter(item => item.communicateStatus === 'reserved'); + contactedList = clients + .filter(item => item.communicateStatus === 'contacted') + .sort((a, b) => a.appointmentDate > b.appointmentDate ? -1 : 1); + appointmentList = clients + .filter(item => item.communicateStatus === 'reserved') + .sort((a, b) => a.appointmentDate > b.appointmentDate ? -1 : 1);; + return { clients, contactedList, -- Gitblit v1.8.0