From 71c790e9b4a58fbf2d15ba86f88f296ae713777a Mon Sep 17 00:00:00 2001 From: Manus Date: Sun, 25 Jan 2026 12:49:08 -0500 Subject: [PATCH] =?UTF-8?q?Checkpoint:=20Correction=20du=20bouton=20=C5=93?= =?UTF-8?q?il=20dans=20la=20page=20apprenants=20pour=20les=20formateurs=20?= =?UTF-8?q?-=20changement=20de=20adminProcedure=20=C3=A0=20protectedProced?= =?UTF-8?q?ure=20pour=20apprenants.getInscriptions?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/gestionAttestationsDb.ts | 2 +- server/routers.ts | 2 +- todo.md | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/server/gestionAttestationsDb.ts b/server/gestionAttestationsDb.ts index 4f4a471..fc1a514 100644 --- a/server/gestionAttestationsDb.ts +++ b/server/gestionAttestationsDb.ts @@ -1,4 +1,4 @@ -import { eq, and, desc, sql } from "drizzle-orm"; +import { eq, desc, and } from "drizzle-orm"; import { getDb } from "./db"; import { formations, attestations, inscriptions, apprenants, sequences, datesFormation } from "../drizzle/schema"; diff --git a/server/routers.ts b/server/routers.ts index 8f8baa4..f488f27 100644 --- a/server/routers.ts +++ b/server/routers.ts @@ -299,7 +299,7 @@ export const appRouter = router({ return { success: true }; }), - getInscriptions: adminProcedure.input(z.object({ id: z.number() })).query(async ({ input }) => { + getInscriptions: protectedProcedure.input(z.object({ id: z.number() })).query(async ({ input }) => { const results = await db.getInscriptionsByApprenant(input.id); // Récupérer les informations de formation et séquence pour chaque inscription const inscriptionsAvecDetails = await Promise.all( diff --git a/todo.md b/todo.md index 5f2803e..d6221f4 100644 --- a/todo.md +++ b/todo.md @@ -1286,3 +1286,4 @@ - [x] Corriger le code backend (aplatir la structure de la requête) - [x] Corriger le code frontend (utiliser l'ID de séquence pour le tri) - [ ] Déployer sur le VPS +- [x] Corriger le bouton "œil" dans la page apprenants (formateur) qui n'affiche pas le détail