From 7d51774b73efc7c52aa91c662a55a2abefd075e2 Mon Sep 17 00:00:00 2001 From: Arnaud AMBROSELLI Date: Fri, 2 Feb 2024 14:26:57 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20tri=20des=20rencontres/passages/observat?= =?UTF-8?q?ions=20par=20d=C3=A9faut=20par=20date=20de=20la=20plus=20r?= =?UTF-8?q?=C3=A9cente=20=C3=A0=20la=20plus=20ancienne=20dans=20le=20nouve?= =?UTF-8?q?au=20compte-rendu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dashboard/src/scenes/report/view.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/dashboard/src/scenes/report/view.js b/dashboard/src/scenes/report/view.js index 70f28820d..5124489e3 100644 --- a/dashboard/src/scenes/report/view.js +++ b/dashboard/src/scenes/report/view.js @@ -193,9 +193,9 @@ const itemsForReportsSelector = selectorFamily({ consultations: Object.values(consultations), comments: Object.values(comments), commentsMedical: Object.values(commentsMedical), - passages: Object.values(passages), - rencontres: Object.values(rencontres), - observations: Object.values(observations), + passages: Object.values(passages).sort((a, b) => (a.date >= b.date ? -1 : 1)), + rencontres: Object.values(rencontres).sort((a, b) => (a.date >= b.date ? -1 : 1)), + observations: Object.values(observations).sort((a, b) => (a.date >= b.date ? -1 : 1)), reports: Object.values(reports), }; },