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:
@@ -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 [];
|
||||
|
||||
Reference in New Issue
Block a user