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