added new styles
This commit is contained in:
@@ -2,12 +2,12 @@ import SearchUser from "@/app/Components/Global/SearchUser/searchUser";
|
||||
import Toggle from "@/app/Components/Global/Toggle/Toggle";
|
||||
import { GetStudent } from "@/app/lib/getStudent";
|
||||
|
||||
import "@/app/globals.css";
|
||||
import SearchBoxEquipo from "@/app/Components/SearchEquipo";
|
||||
import CheckBox from "@/app/Components/CheckBox";
|
||||
import CheckBoxEquipo from "@/app/Components/CheckBoxEquipo";
|
||||
import Information from "@/app/Components/Global/Information/information";
|
||||
|
||||
import "@/app/globals.css";
|
||||
import ShowError from "@/app/Components/Global/ShowError";
|
||||
|
||||
export default async function Page(props: {
|
||||
searchParams?: Promise<{
|
||||
numAcount?: string;
|
||||
@@ -19,45 +19,52 @@ export default async function Page(props: {
|
||||
const machine = params?.machine ? params.machine : null;
|
||||
|
||||
let student: any = null;
|
||||
let errorMessage = "";
|
||||
|
||||
if (numAcount) {
|
||||
const result = await GetStudent(parseInt(numAcount));
|
||||
|
||||
if (result.error) {
|
||||
errorMessage = `${result.error}`;
|
||||
} else {
|
||||
student = result;
|
||||
student = result as Student;
|
||||
}
|
||||
}
|
||||
|
||||
return (
|
||||
<section className="containerSection">
|
||||
|
||||
{errorMessage && <ShowError key={Date.now()} message={errorMessage} />}
|
||||
|
||||
<h2 className="title"> ASIGNACION DE EQUIPOS </h2>
|
||||
|
||||
<Toggle
|
||||
defaultView= "Asignar"
|
||||
defaultView="Asignar"
|
||||
options={[
|
||||
{
|
||||
key: "Asignar",
|
||||
label: "Asignar tiempo",
|
||||
content: (
|
||||
<>
|
||||
|
||||
<SearchUser value={numAcount} />
|
||||
|
||||
<Information
|
||||
numerocuenta={"12345"}
|
||||
nombre={"Carlos"}
|
||||
inscrito={"WINDOWS"}
|
||||
tiempo={"9minutos"}
|
||||
confirmo={"si/no"}
|
||||
/>
|
||||
<label>Seleccionar tiempo</label>
|
||||
<select name="" id=""></select>
|
||||
<label>Seleccione un equipo</label>
|
||||
<select name="" id=""></select>
|
||||
<button className="button buttonSearch">Asignar Equipo</button>
|
||||
{student && (
|
||||
<>
|
||||
<Information
|
||||
numerocuenta={student.id_cuenta}
|
||||
nombre={student.nombre}
|
||||
inscrito={"WINDOWS"}
|
||||
tiempo={"9minutos"}
|
||||
confirmo={"si/no"}
|
||||
/>
|
||||
<label>Seleccionar tiempo</label>
|
||||
<select name="" id=""></select>
|
||||
<label>Seleccione un equipo</label>
|
||||
<select name="" id=""></select>
|
||||
<button className="button buttonSearch">
|
||||
Asignar Equipo
|
||||
</button>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -2,11 +2,36 @@ import AsignacionMesas from "@/app/Components/AsignacionMesas";
|
||||
import CheckBox from "@/app/Components/CheckBox";
|
||||
import Information from "@/app/Components/Global/Information/information";
|
||||
import SearchUser from "@/app/Components/Global/SearchUser/searchUser";
|
||||
import ShowError from "@/app/Components/Global/ShowError";
|
||||
import Toggle from "@/app/Components/Global/Toggle/Toggle";
|
||||
import { GetStudent } from "@/app/lib/getStudent";
|
||||
|
||||
export default async function Page(props: {
|
||||
searchParams?: Promise<{
|
||||
key: string;
|
||||
numAcount: string;
|
||||
}>;
|
||||
}) {
|
||||
const params = await props.searchParams;
|
||||
const key = params?.key && params.key;
|
||||
const numAcount = params?.numAcount ? params.numAcount : null;
|
||||
|
||||
let student: any = null;
|
||||
let errorMessage = "";
|
||||
|
||||
if (numAcount) {
|
||||
const result = await GetStudent(parseInt(numAcount));
|
||||
|
||||
if (result.error) {
|
||||
errorMessage = `${result.error}`;
|
||||
} else {
|
||||
student = result as Student;
|
||||
}
|
||||
}
|
||||
|
||||
export default function Page() {
|
||||
return (
|
||||
<section className="containerSection">
|
||||
{errorMessage && <ShowError key={Date.now()} message={errorMessage} />}
|
||||
<h2 className="title"> ASIGNACION DE MESAS </h2>
|
||||
|
||||
<Toggle
|
||||
@@ -17,14 +42,21 @@ export default function Page() {
|
||||
label: "Asignar mesa",
|
||||
content: (
|
||||
<>
|
||||
<SearchUser value={"3"} />
|
||||
<AsignacionMesas />
|
||||
<Information cuenta={"12345"} nombre={"Alberto"} />
|
||||
<label>Tiempo</label>
|
||||
<select name="" id="">
|
||||
<option value="1">Seleciona el tiempo </option>{" "}
|
||||
</select>
|
||||
<button className="button buttonSearch">Asignar</button>
|
||||
<SearchUser value={numAcount} />
|
||||
{student && (
|
||||
<>
|
||||
<Information
|
||||
cuenta={student.id_cuenta}
|
||||
nombre={student.nombre}
|
||||
/>
|
||||
<AsignacionMesas />
|
||||
<label>Tiempo</label>
|
||||
<select name="" id="">
|
||||
<option value="1">Seleciona el tiempo </option>{" "}
|
||||
</select>
|
||||
<button className="button buttonSearch">Asignar</button>
|
||||
</>
|
||||
)}
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
"use client";
|
||||
export default function SearchEquipo() {
|
||||
return (
|
||||
<form action="">
|
||||
<form className="containerForm">
|
||||
<label>Numero de equipo</label>
|
||||
|
||||
<input type="text" />
|
||||
<button className="button buttonSearch">Buscar</button>
|
||||
<div className="groupInput">
|
||||
<input type="text" placeholder="Coloca el numero de equipo"/>
|
||||
<button className="button buttonSearch">Buscar</button>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
export default function SearchTable() {
|
||||
return (
|
||||
<form className="containerForm">
|
||||
{" "}
|
||||
<label>Numero de Mesa</label>
|
||||
<div className="groupInput">
|
||||
<input type="text" placeholder="Coloca el numero de Mesa" />
|
||||
<button className="buttonSearch button">Buscar</button>
|
||||
</div>
|
||||
<label>Numero de Mesa</label>
|
||||
<div className="groupInput">
|
||||
<input type="text" placeholder="Coloca el numero de Mesa" />
|
||||
<button className="buttonSearch button">Buscar</button>
|
||||
</div>
|
||||
</form>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user