From 9559db59eb418d233682217ef72f315bccc6fe1d Mon Sep 17 00:00:00 2001 From: N3WT DE COMPET Date: Mon, 31 Mar 2025 20:24:05 +0200 Subject: [PATCH] feat: Affichage d'icones dans le tableau des inscriptions dans la colonne actions --- .../app/[locale]/admin/subscriptions/page.js | 62 ++++++------------- 1 file changed, 20 insertions(+), 42 deletions(-) diff --git a/Front-End/src/app/[locale]/admin/subscriptions/page.js b/Front-End/src/app/[locale]/admin/subscriptions/page.js index 628fc89..90f43e7 100644 --- a/Front-End/src/app/[locale]/admin/subscriptions/page.js +++ b/Front-End/src/app/[locale]/admin/subscriptions/page.js @@ -577,67 +577,39 @@ useEffect(()=>{ const actions = { 1: [ { - label: ( - <> - Envoyer - - ), + icon: , onClick: () => sendConfirmRegisterForm(row.student.id, row.student.last_name, row.student.first_name), }, { - label: ( - <> - Modifier - - ), + icon: , onClick: () => window.location.href = `${FE_ADMIN_SUBSCRIPTIONS_EDIT_URL}?studentId=${row.student.id}&id=1`, }, ], 2: [ { - label: ( - <> - Modifier - - ), + icon: , onClick: () => window.location.href = `${FE_ADMIN_SUBSCRIPTIONS_EDIT_URL}?studentId=${row.student.id}&id=1`, }, ], 3: [ { - label: ( - <> - Valider - - ), + icon: , onClick: () => openModalAssociationEleve(row.student), }, { - label: ( - <> - Refuser - - ), + icon: , onClick: () => refuseRegistrationForm(row.student.id, row.student.last_name, row.student.first_name, row.student.guardians[0].associated_profile_email), }, ], 5: [ { - label: ( - <> - Rattacher - - ), + icon: , onClick: () => openModalAssociationEleve(row.student), }, ], default: [ { - label: ( - <> - Archiver - - ), + icon: , onClick: () => archiveFicheInscription(row.student.id, row.student.last_name, row.student.first_name), }, ], @@ -688,13 +660,19 @@ const columns = [ ) }, { name: 'Actions', transform: (row) => ( - } - items={getActionsByStatus(row)} - buttonClassName="text-gray-400 hover:text-gray-600" - menuClassName="absolute right-0 mt-2 w-48 bg-white border border-gray-200 rounded-md shadow-lg z-10 flex flex-col items-center" - /> - ), }, +
+ {getActionsByStatus(row).map((action, index) => ( + + ))} +
+ ), + }, ];