保誠-保戶業務員媒合平台
HelenHuang
2021-12-06 0753a323805d05ba62d6478330a78aee6b47e849
PAMapp/store/index.ts
@@ -115,7 +115,14 @@
    @Action
    storeMyAppointmentReviewLog() {
        getMyReviewLog().then((data) => {
            this.context.commit('updateMyAppointmentReviewLog', data);
            const dataWithLatestDate = data.map((item) => {
                return {
                    ...item,
                    compareDate: new Date(item.lastModifiedDate)
                }
            });
            const sortedData = dataWithLatestDate.sort((a, b) => +b.compareDate - +a.compareDate);
            this.context.commit('updateMyAppointmentReviewLog', sortedData);
        });
    }