[FE] Batch mode: Improe UI

master
Araozu 2023-07-02 21:25:28 -05:00
parent ab378de775
commit cfbd275a0f
3 changed files with 12 additions and 9 deletions

View File

@ -121,7 +121,7 @@ export function DniEntry(props: {dni: string, remove: (_: string) => void}) {
<i class="ph ph-x"></i>
</button>
</div>
<div class="border-l font-mono">
<div class="border-l">
<Switch>
<Match when={certStatus() === Status.Loading}>
<p>Loading...</p>
@ -161,13 +161,16 @@ function CertArray(props: {array: Array<RegisterReturn>}) {
});
return (
<div class="font-mono">
<div>
[
<For each={filtered()}>
{(cert) => (
<span class="mr-4">
{cert.curso_nombre} {cert.fecha_inscripcion}
<div class="mr-4 inline-block underline">
{cert.curso_nombre}&nbsp;
<span class="font-mono">
{cert.fecha_inscripcion}
</span>
</div>
)}
</For>
]

View File

@ -36,13 +36,13 @@ export function DniGroup(props: {group: string, index: number}) {
Grupo #{props.index + 1} - cursos y fechas
</h2>
<hr />
<CourseManager />
<CourseManager personAmount={dnis().length} />
</div>
</div>
);
}
function CourseManager() {
function CourseManager(props: {personAmount: number}) {
const [courses, setCourses] = createSignal<Array<[number, string]>>([]);
async function registerCourse(_: number, subjectId: number, date: string): Promise<null | string> {
@ -76,7 +76,7 @@ function CourseManager() {
disabled:opacity-50 disabled:cursor-not-allowed"
type="button"
>
Registrar <b>todas</b> las personas en <b>todos</b> los cursos
Registrar las <b>{props.personAmount} personas</b> en los <b>{courses().length} cursos</b>
</button>
</div>
</div>

View File

@ -1,4 +1,4 @@
import { createEffect, createMemo, createSignal, For, JSX, Show } from "solid-js";
import { createEffect, createSignal, For } from "solid-js";
import type {CursoGIE} from "../../../model/CursoGIE/cursoGIE.entity";
import { isServer } from "solid-js/web";