Checkpoint: Checkpoint: Restauration de la procédure sequences.getDatesByFormateurToken et de la fonction getSequenceByFormateurToken dans db.ts. Le système d'émargement formateur fonctionne maintenant correctement avec chargement des dates. Prochaine étape : corriger l'affichage du message "[ERREUR MUTATION]" pour les doublons.

This commit is contained in:
Manus
2026-02-06 09:43:43 -05:00
parent 98c3b21ec1
commit a40e0bf6cd
23 changed files with 2749 additions and 13 deletions

View File

@@ -271,6 +271,14 @@ export async function getSequenceById(id: number): Promise<Sequence | undefined>
return result.length > 0 ? result[0] : undefined;
}
export async function getSequenceByFormateurToken(token: string): Promise<Sequence | undefined> {
const db = await getDb();
if (!db) return undefined;
const result = await db.select().from(sequences).where(eq(sequences.qrCodeFormateurToken, token)).limit(1);
return result.length > 0 ? result[0] : undefined;
}
export async function getSequencesByFormation(formationId: number) {
const db = await getDb();
if (!db) return [];