This commit is contained in:
Manus
2026-01-27 08:14:31 -05:00
parent 6c48a8fae0
commit 5821f82eb2
3 changed files with 14 additions and 32 deletions

View File

@@ -269,8 +269,9 @@ export default function FormateurEmargement() {
const presenceInfo = getPresenceInfo(inscrit.inscription.id, date.id, "matin"); const presenceInfo = getPresenceInfo(inscrit.inscription.id, date.id, "matin");
if (presenceInfo) { if (presenceInfo) {
return ( return (
<div className="flex items-center gap-2 ml-3 text-xs text-muted-foreground"> <div className="flex items-center gap-2 ml-2 text-xs text-muted-foreground">
<span>{inscrit.apprenant?.prenom} {inscrit.apprenant?.nom} a validé(e) le {new Date(presenceInfo.heurePresence).toLocaleString("fr-FR", { <span>{inscrit.apprenant?.prenom} {inscrit.apprenant?.nom}</span>
<span>• {new Date(presenceInfo.heurePresence).toLocaleString("fr-FR", {
day: "2-digit", day: "2-digit",
month: "2-digit", month: "2-digit",
year: "numeric", year: "numeric",
@@ -281,14 +282,13 @@ export default function FormateurEmargement() {
<Button <Button
size="sm" size="sm"
variant="ghost" variant="ghost"
className="h-6 w-6 p-0 hover:bg-blue-100" className="h-5 w-5 p-0"
onClick={() => { onClick={() => {
setSelectedSignature(presenceInfo.signatureUrl!); setSelectedSignature(presenceInfo.signatureUrl!);
setShowSignatureDialog(true); setShowSignatureDialog(true);
}} }}
title="Voir la signature"
> >
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="h-5 w-5 text-blue-600"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="h-4 w-4 text-blue-600">
<path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/> <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/>
</svg> </svg>
</Button> </Button>
@@ -329,8 +329,9 @@ export default function FormateurEmargement() {
const presenceInfo = getPresenceInfo(inscrit.inscription.id, date.id, "apres_midi"); const presenceInfo = getPresenceInfo(inscrit.inscription.id, date.id, "apres_midi");
if (presenceInfo) { if (presenceInfo) {
return ( return (
<div className="flex items-center gap-2 ml-3 text-xs text-muted-foreground"> <div className="flex items-center gap-2 ml-2 text-xs text-muted-foreground">
<span>{inscrit.apprenant?.prenom} {inscrit.apprenant?.nom} a validé(e) le {new Date(presenceInfo.heurePresence).toLocaleString("fr-FR", { <span>{inscrit.apprenant?.prenom} {inscrit.apprenant?.nom}</span>
<span>• {new Date(presenceInfo.heurePresence).toLocaleString("fr-FR", {
day: "2-digit", day: "2-digit",
month: "2-digit", month: "2-digit",
year: "numeric", year: "numeric",
@@ -341,14 +342,13 @@ export default function FormateurEmargement() {
<Button <Button
size="sm" size="sm"
variant="ghost" variant="ghost"
className="h-6 w-6 p-0 hover:bg-blue-100" className="h-5 w-5 p-0"
onClick={() => { onClick={() => {
setSelectedSignature(presenceInfo.signatureUrl!); setSelectedSignature(presenceInfo.signatureUrl!);
setShowSignatureDialog(true); setShowSignatureDialog(true);
}} }}
title="Voir la signature"
> >
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="h-5 w-5 text-blue-600"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" strokeWidth="2" strokeLinecap="round" strokeLinejoin="round" className="h-4 w-4 text-blue-600">
<path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/> <path d="M17 3a2.85 2.83 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5Z"/>
</svg> </svg>
</Button> </Button>

View File

@@ -68,9 +68,6 @@ export async function getPresencesBySequence(sequenceId: number) {
modeValidation: presences.modeValidation, modeValidation: presences.modeValidation,
validateurId: presences.validateurId, validateurId: presences.validateurId,
commentaire: presences.commentaire, commentaire: presences.commentaire,
signatureUrl: presences.signatureUrl,
signatureS3Key: presences.signatureS3Key,
dateSigned: presences.dateSigned,
apprenantId: apprenants.id, apprenantId: apprenants.id,
apprenantNom: apprenants.nom, apprenantNom: apprenants.nom,
apprenantPrenom: apprenants.prenom, apprenantPrenom: apprenants.prenom,

23
todo.md
View File

@@ -1314,23 +1314,8 @@
## Affichage des signatures dans l'émargement numérique ## Affichage des signatures dans l'émargement numérique
- [x] Modifier l'API pour récupérer les présences avec signatures - [ ] Modifier l'API pour récupérer les présences avec signatures
- [x] Afficher nom du signataire, date/heure et icône à côté de chaque puce matin/après-midi - [ ] Afficher nom du signataire, date/heure et icône à côté de chaque puce matin/après-midi
- [x] Ajouter une modale pour visualiser la signature en grand format - [ ] Ajouter une modale pour visualiser la signature en grand format
- [ ] Tester l'affichage sur smartphone - [ ] Tester l'affichage sur smartphone
- [x] Déployer sur le VPS - [ ] Déployer sur le VPS
## Correction affichage signature
- [x] Modifier le format d'affichage : "Prénom Nom a validé(e) le date et heure"
- [x] Rendre l'icône de signature plus visible (taille, couleur)
- [ ] Tester l'affichage
- [x] Déployer sur le VPS
## Bug: Icône de signature non visible
- [ ] Vérifier si signatureUrl est bien remplie dans la base de données
- [ ] Vérifier si l'API retourne bien signatureUrl dans getPresencesBySequence
- [ ] Ajouter des logs pour déboguer
- [ ] Corriger le problème
- [ ] Déployer