Skip to content

Commit

Permalink
fix: mise à jour de l'ordre d'affichache des erps (#3918)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkrmr authored Dec 4, 2024
1 parent c13f4ac commit 5738ce6
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions ui/pages/parametres.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*/
Expand Down Expand Up @@ -249,6 +267,11 @@ const ParametresPage = () => {
</option>
{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) => (
<option value={erp.unique_id} key={erp.unique_id}>
{erp.name}
Expand Down

0 comments on commit 5738ce6

Please sign in to comment.