diff --git a/src/views/components/Registers.tsx b/src/views/components/Registers.tsx index 884b069..e505282 100644 --- a/src/views/components/Registers.tsx +++ b/src/views/components/Registers.tsx @@ -1,4 +1,4 @@ -import { Show, createEffect, createSignal, For } from "solid-js"; +import { Show, createEffect, createSignal, For, JSX } from "solid-js"; import { Person } from "../../types/Person"; import { RegisterReturn } from "../../types/RegisterReturn"; @@ -52,6 +52,50 @@ export function Registers(props: { person: Person | null, lastUpdate: number }) /> +
+
+ + Nombres y Apellidos + + + + Apellidos y Nombres + + +
+ +
+ + Nombres  + + + + Apellidos + + + + Paterno + + + + Materno + + +
+
+

void }) { a.click(); window.URL.revokeObjectURL(url); } else { - const json = await response.json(); - alert(json); + try { + const json = await response.json(); + alert(json); + } catch (e) { + alert("Unknown error downloading..."); + } } setDownloading(false); @@ -159,18 +207,18 @@ function Register(props: { cert: RegisterReturn, onUpdate: () => void }) { {props.cert.curso_nombre} {props.cert.fecha_inscripcion.toString()} {props.cert.codigo} - + - + @@ -194,3 +242,25 @@ function Register(props: { cert: RegisterReturn, onUpdate: () => void }) { ); } + +function CopyButton(props: {copyText: string, children: Array}) { + const [successAnimation, setSuccessAnimation] = createSignal(false); + + const onclick = () => { + navigator.clipboard.writeText(props.copyText); + setSuccessAnimation(true); + setTimeout(() => setSuccessAnimation(false), 500); + } + + return ( + + ) +} diff --git a/src/views/components/Search.tsx b/src/views/components/Search.tsx index daa438d..7d1d49d 100644 --- a/src/views/components/Search.tsx +++ b/src/views/components/Search.tsx @@ -161,10 +161,10 @@ function InputBox(props: { onclick={copyToClipboard} type="button" > - + )