From f3a182028ec0993e32c4b96d7d418521b48ac110 Mon Sep 17 00:00:00 2001 From: Araozu Date: Sat, 10 Jun 2023 22:35:36 -0500 Subject: [PATCH] [FE] Add button to copy a certificate's code --- src/views/components/Registers.tsx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/src/views/components/Registers.tsx b/src/views/components/Registers.tsx index e505282..262c981 100644 --- a/src/views/components/Registers.tsx +++ b/src/views/components/Registers.tsx @@ -53,7 +53,7 @@ export function Registers(props: { person: Person | null, lastUpdate: number })
-
+
@@ -68,7 +68,7 @@ export function Registers(props: { person: Person | null, lastUpdate: number })
-
+
@@ -202,11 +202,21 @@ function Register(props: { cert: RegisterReturn, onUpdate: () => void }) { setDownloading(false); }; + const certCode = () => props.cert.codigo.toString().padStart(4, "0"); + return ( {props.cert.curso_nombre} {props.cert.fecha_inscripcion.toString()} - {props.cert.codigo} + + + + {certCode()} + + +