Checkpoint: Implémentation du QR code dédié pour l'émargement formateur avec signature tactile
- Création de la page /emargement-formateur/:token avec formulaire simplifié - Procédure backend presences.validerFormateur dédiée - Deux boutons QR code dans l'interface formateur (apprenants + formateur) - Génération automatique des URL distinctes pour chaque type d'utilisateur - Déploiement réussi sur le VPS de production
This commit is contained in:
@@ -38,13 +38,7 @@ export default function EmargementScan() {
|
||||
// Récupérer les inscriptions de l'apprenant avec les dates
|
||||
const { data: inscriptions } = trpc.inscriptions.listByApprenantWithDates.useQuery(
|
||||
{ apprenantId: apprenant?.id || 0 },
|
||||
{ enabled: !!apprenant }
|
||||
);
|
||||
|
||||
// Récupérer les séquences pour le token (pour les formateurs)
|
||||
const { data: sequenceData } = trpc.presences.getSequenceByToken.useQuery(
|
||||
{ token: token || "" },
|
||||
{ enabled: emailConfirmed && isFormateur && !!token }
|
||||
{ enabled: !!apprenant && !isFormateur }
|
||||
);
|
||||
|
||||
// Récupérer les dates de formation pour l'inscription sélectionnée
|
||||
@@ -86,129 +80,111 @@ export default function EmargementScan() {
|
||||
setIsFormateur(false);
|
||||
setEmailConfirmed(true);
|
||||
} else {
|
||||
// Peut-être un formateur, on continue quand même
|
||||
// C'est un formateur
|
||||
setIsFormateur(true);
|
||||
setEmailConfirmed(true);
|
||||
// Pour les formateurs, on passe directement à la signature
|
||||
setShowSignaturePad(true);
|
||||
}
|
||||
};
|
||||
|
||||
const handleValiderWithSignature = (signatureDataUrl: string) => {
|
||||
if (isFormateur) {
|
||||
// Pour les formateurs : validation directe avec le token
|
||||
validerPresence({
|
||||
token: token || "",
|
||||
email,
|
||||
periode: selectedPeriode,
|
||||
signatureDataUrl,
|
||||
});
|
||||
} else {
|
||||
// Pour les apprenants : validation classique
|
||||
if (!selectedDateId) {
|
||||
toast.error("Veuillez sélectionner une date");
|
||||
return;
|
||||
}
|
||||
|
||||
validerPresence({
|
||||
token: token || "",
|
||||
dateId: selectedDateId,
|
||||
periode: selectedPeriode,
|
||||
email,
|
||||
signatureDataUrl,
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
const handleValider = () => {
|
||||
if (isFormateur) {
|
||||
// Pour un formateur, on a juste besoin de la date et de la période
|
||||
if (!selectedDateId) {
|
||||
toast.error("Veuillez sélectionner une date de formation");
|
||||
return;
|
||||
}
|
||||
// Pour les formateurs, on affiche le pad de signature
|
||||
setShowSignaturePad(true);
|
||||
} else {
|
||||
// Pour un apprenant, on a besoin de l'inscription et de la date
|
||||
if (!selectedInscriptionId || !selectedDateId) {
|
||||
toast.error("Veuillez sélectionner une date de formation");
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// Afficher le pad de signature
|
||||
setShowSignaturePad(true);
|
||||
};
|
||||
|
||||
const handleValiderWithSignature = (dataUrl: string) => {
|
||||
if (isFormateur) {
|
||||
// Pour un formateur
|
||||
// Pour les apprenants, vérifier les champs requis
|
||||
if (!selectedDateId) {
|
||||
toast.error("Veuillez sélectionner une date de formation");
|
||||
toast.error("Veuillez sélectionner une date");
|
||||
return;
|
||||
}
|
||||
|
||||
validerPresence({
|
||||
token,
|
||||
email,
|
||||
dateFormationId: selectedDateId,
|
||||
periode: selectedPeriode,
|
||||
modeValidation: "qrcode",
|
||||
signatureDataUrl: dataUrl,
|
||||
});
|
||||
} else {
|
||||
// Pour un apprenant
|
||||
if (!selectedInscriptionId || !selectedDateId) {
|
||||
toast.error("Veuillez sélectionner une date de formation");
|
||||
return;
|
||||
}
|
||||
|
||||
validerPresence({
|
||||
token,
|
||||
email,
|
||||
inscriptionId: selectedInscriptionId,
|
||||
dateFormationId: selectedDateId,
|
||||
periode: selectedPeriode,
|
||||
modeValidation: "qrcode",
|
||||
signatureDataUrl: dataUrl,
|
||||
});
|
||||
setShowSignaturePad(true);
|
||||
}
|
||||
};
|
||||
|
||||
// Déterminer les dates disponibles
|
||||
const datesDisponibles = isFormateur
|
||||
? (sequenceData?.dates || [])
|
||||
: ((selectedInscription?.sequence as any)?.dates || []);
|
||||
if (!token) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 p-4">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2 text-red-600">
|
||||
<XCircle className="h-6 w-6" />
|
||||
Lien invalide
|
||||
</CardTitle>
|
||||
<CardDescription>Le lien d'émargement est invalide ou a expiré.</CardDescription>
|
||||
</CardHeader>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (showSignaturePad) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 p-4">
|
||||
<Card className="w-full max-w-2xl">
|
||||
<CardHeader>
|
||||
<CardTitle>Signature de présence</CardTitle>
|
||||
<CardDescription>
|
||||
{isFormateur
|
||||
? "Signez pour valider votre présence en tant que formateur"
|
||||
: "Signez pour valider votre présence"}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<SignaturePadComponent
|
||||
onSave={handleSaveSignature}
|
||||
onCancel={() => setShowSignaturePad(false)}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
if (success) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-green-50 via-emerald-50 to-green-100 p-4">
|
||||
<Card className="max-w-md w-full shadow-2xl border-2 border-green-200 animate-in fade-in zoom-in duration-500">
|
||||
<CardHeader className="text-center">
|
||||
<div className="mx-auto mb-4 w-20 h-20 bg-gradient-to-br from-green-500 to-emerald-600 rounded-full flex items-center justify-center shadow-lg animate-in zoom-in duration-700 delay-150">
|
||||
<CheckCircle2 className="h-12 w-12 text-white animate-in zoom-in duration-500 delay-300" />
|
||||
</div>
|
||||
<CardTitle className="text-3xl font-bold text-green-700 animate-in slide-in-from-bottom duration-500 delay-200">
|
||||
Présence validée !
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-green-50 to-emerald-100 p-4">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2 text-green-600">
|
||||
<CheckCircle2 className="h-6 w-6" />
|
||||
Présence validée
|
||||
</CardTitle>
|
||||
<CardDescription className="text-base mt-2 animate-in slide-in-from-bottom duration-500 delay-300">
|
||||
<CardDescription>
|
||||
Votre présence a été enregistrée avec succès
|
||||
{heureEnregistrement && (
|
||||
<span className="block mt-2 text-sm">
|
||||
Heure d'enregistrement : {heureEnregistrement.toLocaleTimeString("fr-FR")}
|
||||
</span>
|
||||
)}
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="text-center space-y-4 animate-in slide-in-from-bottom duration-500 delay-400">
|
||||
{heureEnregistrement && (
|
||||
<div className="p-4 bg-green-50 border-2 border-green-200 rounded-lg">
|
||||
<p className="text-sm font-medium text-green-800 mb-1">
|
||||
🕒 Heure d'enregistrement
|
||||
</p>
|
||||
<p className="text-2xl font-bold text-green-700">
|
||||
{heureEnregistrement.toLocaleTimeString("fr-FR", {
|
||||
hour: "2-digit",
|
||||
minute: "2-digit",
|
||||
second: "2-digit",
|
||||
})}
|
||||
</p>
|
||||
<p className="text-xs text-green-600 mt-1">
|
||||
{heureEnregistrement.toLocaleDateString("fr-FR", {
|
||||
weekday: "long",
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
})}
|
||||
</p>
|
||||
</div>
|
||||
)}
|
||||
<p className="text-sm text-muted-foreground">
|
||||
Merci d'avoir confirmé votre présence. Vous pouvez maintenant fermer cette page.
|
||||
</p>
|
||||
<Button
|
||||
variant="outline"
|
||||
className="w-full"
|
||||
onClick={() => {
|
||||
setSuccess(false);
|
||||
setHeureEnregistrement(null);
|
||||
setEmail("");
|
||||
setEmailConfirmed(false);
|
||||
setSelectedInscriptionId(null);
|
||||
setSelectedDateId(null);
|
||||
setError(null);
|
||||
setIsFormateur(false);
|
||||
}}
|
||||
>
|
||||
Valider une autre présence
|
||||
</Button>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
);
|
||||
@@ -216,26 +192,17 @@ export default function EmargementScan() {
|
||||
|
||||
if (error) {
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-red-50 to-red-100 p-4">
|
||||
<Card className="max-w-md w-full">
|
||||
<CardHeader className="text-center">
|
||||
<div className="mx-auto mb-4 w-16 h-16 bg-red-500 rounded-full flex items-center justify-center">
|
||||
<XCircle className="h-10 w-10 text-white" />
|
||||
</div>
|
||||
<CardTitle className="text-2xl text-red-700">Erreur</CardTitle>
|
||||
<CardDescription>{error}</CardDescription>
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-red-50 to-rose-100 p-4">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader>
|
||||
<CardTitle className="flex items-center gap-2 text-red-600">
|
||||
<XCircle className="h-6 w-6" />
|
||||
Erreur
|
||||
</CardTitle>
|
||||
<CardDescription className="text-red-600">{error}</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="text-center">
|
||||
<Button
|
||||
onClick={() => {
|
||||
setError(null);
|
||||
setEmail("");
|
||||
setEmailConfirmed(false);
|
||||
setSelectedInscriptionId(null);
|
||||
setSelectedDateId(null);
|
||||
setIsFormateur(false);
|
||||
}}
|
||||
>
|
||||
<CardContent>
|
||||
<Button onClick={() => window.location.reload()} className="w-full">
|
||||
Réessayer
|
||||
</Button>
|
||||
</CardContent>
|
||||
@@ -246,23 +213,20 @@ export default function EmargementScan() {
|
||||
|
||||
return (
|
||||
<div className="min-h-screen flex items-center justify-center bg-gradient-to-br from-blue-50 to-indigo-100 p-4">
|
||||
<Card className="max-w-md w-full">
|
||||
<Card className="w-full max-w-md">
|
||||
<CardHeader>
|
||||
<CardTitle className="text-2xl">Émargement numérique</CardTitle>
|
||||
<CardDescription>
|
||||
Validez votre présence en renseignant vos informations
|
||||
</CardDescription>
|
||||
<CardTitle>Émargement numérique</CardTitle>
|
||||
<CardDescription>Validez votre présence en renseignant vos informations</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent className="space-y-4">
|
||||
{/* Étape 1: Saisie de l'email */}
|
||||
{!emailConfirmed && (
|
||||
<div className="space-y-3">
|
||||
<div>
|
||||
<Label htmlFor="email">Votre email</Label>
|
||||
<CardContent className="space-y-6">
|
||||
{!emailConfirmed ? (
|
||||
<div className="space-y-4">
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="email">Email</Label>
|
||||
<Input
|
||||
id="email"
|
||||
type="email"
|
||||
placeholder="prenom.nom@exemple.fr"
|
||||
placeholder="votre.email@exemple.com"
|
||||
value={email}
|
||||
onChange={(e) => setEmail(e.target.value)}
|
||||
onKeyDown={(e) => {
|
||||
@@ -276,210 +240,140 @@ export default function EmargementScan() {
|
||||
Continuer
|
||||
</Button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Étape 2: Sélection pour apprenant */}
|
||||
{emailConfirmed && !isFormateur && apprenant && !success && (
|
||||
) : isFormateur ? (
|
||||
<div className="space-y-4">
|
||||
<div className="p-3 bg-muted rounded-lg">
|
||||
<p className="text-sm font-medium">
|
||||
{apprenant.prenom} {apprenant.nom}
|
||||
</p>
|
||||
<p className="text-xs text-muted-foreground">{apprenant.email}</p>
|
||||
<div className="bg-blue-50 border border-blue-200 rounded-lg p-4">
|
||||
<div className="flex items-center gap-2 mb-2">
|
||||
<span className="text-2xl">👨🏫</span>
|
||||
<span className="font-semibold text-blue-900">Mode formateur</span>
|
||||
</div>
|
||||
<p className="text-sm text-blue-700">{email}</p>
|
||||
</div>
|
||||
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="periode">Période</Label>
|
||||
<Select
|
||||
value={selectedPeriode}
|
||||
onValueChange={(value: "matin" | "apres_midi") => setSelectedPeriode(value)}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="matin">Matin</SelectItem>
|
||||
<SelectItem value="apres_midi">Après-midi</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<Button onClick={handleValider} className="w-full" disabled={validating}>
|
||||
{validating ? (
|
||||
<>
|
||||
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
|
||||
Validation en cours...
|
||||
</>
|
||||
) : (
|
||||
"Signer ma présence"
|
||||
)}
|
||||
</Button>
|
||||
</div>
|
||||
) : (
|
||||
<div className="space-y-4">
|
||||
<div className="bg-green-50 border border-green-200 rounded-lg p-4">
|
||||
<p className="text-sm font-medium text-green-900">{apprenant?.nom} {apprenant?.prenom}</p>
|
||||
<p className="text-sm text-green-700">{email}</p>
|
||||
</div>
|
||||
|
||||
{inscriptions && inscriptions.length > 0 ? (
|
||||
<>
|
||||
<div>
|
||||
<Label>Sélectionnez votre formation</Label>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="inscription">Formation</Label>
|
||||
<Select
|
||||
value={selectedInscriptionId?.toString() || ""}
|
||||
value={selectedInscriptionId?.toString()}
|
||||
onValueChange={(value) => {
|
||||
setSelectedInscriptionId(parseInt(value));
|
||||
setSelectedDateId(null);
|
||||
}}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Choisir une formation..." />
|
||||
<SelectValue placeholder="Sélectionnez une formation" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{inscriptions.map((inscr) => (
|
||||
<SelectItem key={inscr.inscription.id} value={inscr.inscription.id.toString()}>
|
||||
{inscr.sequence?.nom || "Formation"}
|
||||
{inscriptions.map((item) => (
|
||||
<SelectItem key={item.inscription.id} value={item.inscription.id.toString()}>
|
||||
{item.sequence.formation.nom} - {item.sequence.nom}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
{selectedInscriptionId && datesDisponibles.length > 0 && (
|
||||
<>
|
||||
<div>
|
||||
<Label>Sélectionnez la date</Label>
|
||||
<Select
|
||||
value={selectedDateId?.toString() || ""}
|
||||
onValueChange={(value) => setSelectedDateId(parseInt(value))}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Choisir une date..." />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{datesDisponibles.map((date: any) => (
|
||||
<SelectItem key={date.id} value={date.id.toString()}>
|
||||
{new Date(date.dateDebut).toLocaleDateString("fr-FR", {
|
||||
weekday: "long",
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
})}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<Label>Période</Label>
|
||||
<Select
|
||||
value={selectedPeriode}
|
||||
onValueChange={(value: "matin" | "apres_midi") => setSelectedPeriode(value)}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="matin">Matin</SelectItem>
|
||||
<SelectItem value="apres_midi">Après-midi</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<Button onClick={handleValider} className="w-full" disabled={validating}>
|
||||
{validating ? (
|
||||
<>
|
||||
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
|
||||
Validation en cours...
|
||||
</>
|
||||
) : (
|
||||
"Signer et valider"
|
||||
)}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
) : (
|
||||
<p className="text-center text-muted-foreground py-4">
|
||||
Aucune inscription trouvée pour cet email
|
||||
</p>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{/* Étape 2: Sélection pour formateur */}
|
||||
{emailConfirmed && isFormateur && !success && (
|
||||
<div className="space-y-4">
|
||||
<div className="p-3 bg-blue-50 border border-blue-200 rounded-lg">
|
||||
<p className="text-sm font-medium text-blue-900">
|
||||
👨🏫 Mode formateur
|
||||
</p>
|
||||
<p className="text-xs text-blue-700">{email}</p>
|
||||
</div>
|
||||
|
||||
{sequenceData && sequenceData.dates && sequenceData.dates.length > 0 ? (
|
||||
<>
|
||||
<div>
|
||||
<Label>Formation</Label>
|
||||
<div className="p-3 bg-muted rounded-lg">
|
||||
<p className="text-sm font-medium">{sequenceData.nom}</p>
|
||||
<p className="text-xs text-muted-foreground">{sequenceData.lieu}</p>
|
||||
{selectedInscription && (
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="date">Date</Label>
|
||||
<Select
|
||||
value={selectedDateId?.toString()}
|
||||
onValueChange={(value) => setSelectedDateId(parseInt(value))}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Sélectionnez une date" />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{selectedInscription.dates.map((date) => (
|
||||
<SelectItem key={date.id} value={date.id.toString()}>
|
||||
{new Date(date.dateDebut).toLocaleDateString("fr-FR", {
|
||||
weekday: "long",
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
})}
|
||||
</SelectItem>
|
||||
))}
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
<div>
|
||||
<Label>Sélectionnez la date</Label>
|
||||
<div className="space-y-2">
|
||||
<Label htmlFor="periode">Période</Label>
|
||||
<Select
|
||||
value={selectedDateId?.toString() || ""}
|
||||
onValueChange={(value) => setSelectedDateId(parseInt(value))}
|
||||
value={selectedPeriode}
|
||||
onValueChange={(value: "matin" | "apres_midi") => setSelectedPeriode(value)}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue placeholder="Choisir une date..." />
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{sequenceData.dates.map((date: any) => (
|
||||
<SelectItem key={date.id} value={date.id.toString()}>
|
||||
{new Date(date.dateDebut).toLocaleDateString("fr-FR", {
|
||||
weekday: "long",
|
||||
year: "numeric",
|
||||
month: "long",
|
||||
day: "numeric",
|
||||
})}
|
||||
</SelectItem>
|
||||
))}
|
||||
<SelectItem value="matin">Matin</SelectItem>
|
||||
<SelectItem value="apres_midi">Après-midi</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
{selectedDateId && (
|
||||
<>
|
||||
<div>
|
||||
<Label>Période</Label>
|
||||
<Select
|
||||
value={selectedPeriode}
|
||||
onValueChange={(value: "matin" | "apres_midi") => setSelectedPeriode(value)}
|
||||
>
|
||||
<SelectTrigger>
|
||||
<SelectValue />
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
<SelectItem value="matin">Matin</SelectItem>
|
||||
<SelectItem value="apres_midi">Après-midi</SelectItem>
|
||||
</SelectContent>
|
||||
</Select>
|
||||
</div>
|
||||
|
||||
<Button onClick={handleValider} className="w-full" disabled={validating}>
|
||||
{validating ? (
|
||||
<>
|
||||
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
|
||||
Validation en cours...
|
||||
</>
|
||||
) : (
|
||||
"Signer et valider"
|
||||
)}
|
||||
</Button>
|
||||
</>
|
||||
)}
|
||||
<Button
|
||||
onClick={handleValider}
|
||||
className="w-full"
|
||||
disabled={!selectedDateId || validating}
|
||||
>
|
||||
{validating ? (
|
||||
<>
|
||||
<Loader2 className="mr-2 h-4 w-4 animate-spin" />
|
||||
Validation en cours...
|
||||
</>
|
||||
) : (
|
||||
"Valider ma présence"
|
||||
)}
|
||||
</Button>
|
||||
</>
|
||||
) : (
|
||||
<div className="text-center py-4">
|
||||
<Loader2 className="h-6 w-6 animate-spin mx-auto mb-2" />
|
||||
<p className="text-sm text-muted-foreground">Chargement des informations...</p>
|
||||
<div className="text-center py-8 text-gray-500">
|
||||
<p>Aucune inscription trouvée pour cet email.</p>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
</CardContent>
|
||||
</Card>
|
||||
|
||||
{/* Dialog de signature */}
|
||||
{showSignaturePad && (
|
||||
<div className="fixed inset-0 bg-black/50 flex items-center justify-center p-4 z-50">
|
||||
<Card className="max-w-2xl w-full">
|
||||
<CardHeader>
|
||||
<CardTitle>Signature</CardTitle>
|
||||
<CardDescription>
|
||||
Signez dans le cadre ci-dessous pour valider votre présence
|
||||
</CardDescription>
|
||||
</CardHeader>
|
||||
<CardContent>
|
||||
<SignaturePadComponent
|
||||
onSave={handleSaveSignature}
|
||||
onCancel={() => setShowSignaturePad(false)}
|
||||
/>
|
||||
</CardContent>
|
||||
</Card>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user