fixed addTime and added new BarNavigation
This commit is contained in:
@@ -66,6 +66,13 @@ export default function Inscripcion({
|
||||
return;
|
||||
}
|
||||
|
||||
if (!plataformaSeleccionada) {
|
||||
toast.error("Selecciona una plataforma");
|
||||
return;
|
||||
}
|
||||
|
||||
const id_plataforma = PLATAFORMA_MAP[plataformaSeleccionada];
|
||||
|
||||
try {
|
||||
await PostReceipt({
|
||||
id_cuenta: numAcount,
|
||||
@@ -74,6 +81,24 @@ export default function Inscripcion({
|
||||
fecha_recibo: date,
|
||||
});
|
||||
|
||||
const res = await fetch(`${envConfig.apiUrl}/alumno-inscrito`, {
|
||||
method: "POST",
|
||||
headers: { "Content-Type": "application/json" },
|
||||
body: JSON.stringify({
|
||||
id_cuenta: numAcount,
|
||||
id_plataforma,
|
||||
realizo_pago: false,
|
||||
}),
|
||||
});
|
||||
|
||||
const data = await res.json();
|
||||
|
||||
if (!res.ok) {
|
||||
throw new Error(data.message || "Error al inscribir");
|
||||
}
|
||||
|
||||
toast.success("Alumno con pago");
|
||||
|
||||
setFolio("");
|
||||
setAmount("");
|
||||
setDate("");
|
||||
|
||||
Reference in New Issue
Block a user