fixed numAcount
This commit is contained in:
@@ -1,8 +1,8 @@
|
||||
"use client";
|
||||
|
||||
import { useEffect, useState } from "react";
|
||||
import { toast } from "react-toastify";
|
||||
import { envConfig } from "@/app/lib/config";
|
||||
import toast from "react-hot-toast";
|
||||
|
||||
type Props = {
|
||||
inscripcion: any[];
|
||||
@@ -22,10 +22,7 @@ export default function PlaticaGate({ inscripcion, idCuenta }: Props) {
|
||||
);
|
||||
|
||||
if (!todasAsistieron) {
|
||||
toast.error("El alumno no asistió a todas las pláticas", {
|
||||
position: "top-right",
|
||||
autoClose: 4000,
|
||||
});
|
||||
toast.error("El alumno no asistió a todas las pláticas");
|
||||
setPuedeContinuar(false);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,8 @@ import Table from "@/app/Components/Global/table";
|
||||
|
||||
import { envConfig } from "@/app/lib/config";
|
||||
import { GetRegisterStudent } from "@/app/lib/getRegisterStudent";
|
||||
import "@/app/globals.css";
|
||||
import PlaticaGate from "./PlaticaGate";
|
||||
import "@/app/globals.css";
|
||||
|
||||
async function getInscripcion(idCuenta: number) {
|
||||
try {
|
||||
@@ -102,11 +102,14 @@ export default async function Page(props: {
|
||||
|
||||
{student && (
|
||||
<>
|
||||
<div>
|
||||
|
||||
<Information
|
||||
NoCuenta={student.id_cuenta}
|
||||
nombre={student.nombre}
|
||||
/>
|
||||
/>
|
||||
<Table headers={headers} data={tableData} />
|
||||
</div>
|
||||
|
||||
<PlaticaGate inscripcion={inscripcion} idCuenta={student.id_cuenta}/>
|
||||
</>
|
||||
@@ -119,7 +122,7 @@ export default async function Page(props: {
|
||||
label: "Cancelar tiempo",
|
||||
content: (
|
||||
<>
|
||||
<CheckBoxEquipo />
|
||||
<CheckBoxEquipo numAcount={params?.numAcount}/>
|
||||
</>
|
||||
),
|
||||
},
|
||||
|
||||
@@ -4,10 +4,11 @@ import Toggle from "@/app/Components/Global/Toggle/Toggle";
|
||||
import Equipos from "@/app/Components/Equipos/equipos";
|
||||
import ProgramSelector from "@/app/Components/InformacionEquipos/ProgramSelector";
|
||||
import SelectorSala from "@/app/Components/InformacionEquipos/SelectorSala";
|
||||
import SelectorEquipo from "@/app/Components/InformacionEquipos/SelectorEquipo";
|
||||
|
||||
import { useState } from "react";
|
||||
|
||||
import "./informacionequipo.css";
|
||||
import SelectorEquipo from "@/app/Components/InformacionEquipos/SelectorEquipo";
|
||||
|
||||
export default function InformacionEquipo({
|
||||
defaultKey,
|
||||
|
||||
@@ -4,7 +4,11 @@ import { useState } from "react";
|
||||
import SearchUser from "./Global/SearchUser/searchUser";
|
||||
import SearchBoxEquipo from "./SearchEquipo";
|
||||
|
||||
export default function CheckBoxEquipo() {
|
||||
export default function CheckBoxEquipo({
|
||||
numAcount,
|
||||
}: {
|
||||
numAcount?: string | null;
|
||||
}) {
|
||||
const [modo, setModo] = useState<"Equipo" | "Cuenta" | null>(null);
|
||||
|
||||
return (
|
||||
@@ -33,7 +37,7 @@ export default function CheckBoxEquipo() {
|
||||
</label>
|
||||
</div>
|
||||
|
||||
{modo === "Cuenta" && <SearchUser value={"3"} />}
|
||||
{modo === "Cuenta" && <SearchUser value={numAcount ?? null} />}
|
||||
{modo === "Equipo" && <SearchBoxEquipo />}
|
||||
</>
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user