diff --git a/src/views/Certs.tsx b/src/views/Certs.tsx index a975afb..5bc9be2 100644 --- a/src/views/Certs.tsx +++ b/src/views/Certs.tsx @@ -12,19 +12,13 @@ export function Certs() { onMount(ensureColors); return ( -
Proximamente...
++ {error()} +
+ > + ); +} + + diff --git a/src/views/components/NewRegister/RegisterPreview.tsx b/src/views/components/NewRegister/RegisterPreview.tsx new file mode 100644 index 0000000..1a8a695 --- /dev/null +++ b/src/views/components/NewRegister/RegisterPreview.tsx @@ -0,0 +1,95 @@ + +import { FilledCard } from "../FilledCard"; +import { For } from "solid-js"; +import { XIcon } from "src/views/icons/XIcon"; +import { subjects } from "src/views/subjects"; + +function isoDateToLocalDate(date: string): string { + const [,month, day] = /\d{4}-(\d{2})-(\d{2})/.exec(date) ?? ""; + return `${day}/${month}`; +} + +export function RegisterPreview(props: {selections: Array<[number, string]>, personId: number | null, onDelete: (v: number) => void, onRegister: () => void}) { + const submit = async() => { + console.log("Submit..."); + + for (const [courseId, date] of props.selections) { + const result = await defaultNewRegisterFn( + props.personId ?? -1, + courseId, + date, + ); + + if (result === null) { + console.log("Success"); + } else { + console.log(`error. ${result}`); + } + } + + props.onRegister(); + }; + + return ( + void}) {
const [error, setError] = createSignal("");
const [warning, setWarning] = createSignal("");
const [qrBase64, setQrBase64] = createSignal1. Buscar persona
-