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

View File

@ -36,13 +36,13 @@ export function DniGroup(props: {group: string, index: number}) {
Grupo #{props.index + 1} - cursos y fechas Grupo #{props.index + 1} - cursos y fechas
</h2> </h2>
<hr /> <hr />
<CourseManager /> <CourseManager personAmount={dnis().length} />
</div> </div>
</div> </div>
); );
} }
function CourseManager() { function CourseManager(props: {personAmount: number}) {
const [courses, setCourses] = createSignal<Array<[number, string]>>([]); const [courses, setCourses] = createSignal<Array<[number, string]>>([]);
async function registerCourse(_: number, subjectId: number, date: string): Promise<null | 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" disabled:opacity-50 disabled:cursor-not-allowed"
type="button" 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> </button>
</div> </div>
</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 type {CursoGIE} from "../../../model/CursoGIE/cursoGIE.entity";
import { isServer } from "solid-js/web"; import { isServer } from "solid-js/web";