From 5738ce6c23c840d2df6c62421dab640b2e0d8a28 Mon Sep 17 00:00:00 2001 From: Nicolas KREMER Date: Wed, 4 Dec 2024 17:08:39 +0100 Subject: [PATCH] =?UTF-8?q?fix:=20mise=20=C3=A0=20jour=20de=20l'ordre=20d'?= =?UTF-8?q?affichache=20des=20erps=20(#3918)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ui/pages/parametres.tsx | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ui/pages/parametres.tsx b/ui/pages/parametres.tsx index 0d6a9492c..a20e2d688 100644 --- a/ui/pages/parametres.tsx +++ b/ui/pages/parametres.tsx @@ -42,6 +42,24 @@ import { Check, DownloadLine, Checkbox as IconCheckbox } from "@/theme/component export const getServerSideProps = async (context) => ({ props: { ...(await getAuthServerSideProps(context)) } }); +const desiredOrder = [ + "ymag", + "gesti", + "scform", + "fcamanager", + "aimaira", + "cactus", + "myclic", + "gescicca", + "formasup", + "formasup-hdf", + "charlemagne", + "ammon", + "ofa-link", + "filiz", + "hyperplanning", +]; + /** * Composant à plusieurs états selon stepConfigurationERP. */ @@ -249,6 +267,11 @@ const ParametresPage = () => { {erps .filter(({ disabled }) => !disabled) + .sort((a, b) => { + const indexA = desiredOrder.indexOf(a.unique_id); + const indexB = desiredOrder.indexOf(b.unique_id); + return indexA - indexB; + }) .map((erp) => (