diff --git a/packages/frontend/src/features/menu/ClauseMenu.tsx b/packages/frontend/src/features/menu/ClauseMenu.tsx index ecf94240..7f2d8af0 100644 --- a/packages/frontend/src/features/menu/ClauseMenu.tsx +++ b/packages/frontend/src/features/menu/ClauseMenu.tsx @@ -12,7 +12,10 @@ export const ClauseMenu = ({ isNational }: { isNational: boolean }) => { const clausesQuery = useLiveQuery( db.clause.liveMany({ where: { - udap_id: isNational ? "ALL" : user.udap_id, + key: { + in: isNational ? ["type-espace", "decision"] : ["contacts-utiles", "bonnes-pratiques"], + }, + OR: [{ udap_id: "ALL" }, { udap_id: user.udap_id! }], }, }), ); @@ -29,7 +32,7 @@ export const ClauseMenu = ({ isNational }: { isNational: boolean }) => { - {key} + {(clauseNameMap as any)[key] ?? key} {clauses.map((clause) => ( @@ -53,3 +56,10 @@ export const ClauseMenu = ({ isNational }: { isNational: boolean }) => { ); }; + +const clauseNameMap = { + "type-espace": "Type d'espace", + decision: "Décision", + "contacts-utiles": "Contacts utiles", + "bonnes-pratiques": "Bonnes pratiques", +};