fixed style and other errors
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
import SearchUser from "@/app/Components/SearchUser/searchUser";
|
||||
import Information from "@/app/Components/Information/information";
|
||||
import Receipt from "@/app/Components/Receipt/Receipt";
|
||||
import AlertBox from "@/app/Components/AlertBox/AlertBox";
|
||||
|
||||
import { GetStudent } from "@/app/lib/getStudent";
|
||||
|
||||
import "./addTime.css";
|
||||
@@ -8,10 +10,14 @@ import "./addTime.css";
|
||||
export default async function Page(props: {
|
||||
searchParams?: Promise<{
|
||||
numAcount: string;
|
||||
success?: string;
|
||||
error?: string;
|
||||
}>;
|
||||
}) {
|
||||
const params = await props.searchParams;
|
||||
const numAcount = params?.numAcount ? params.numAcount : null;
|
||||
const showSuccess = params?.success ? parseInt(params.success) : null;
|
||||
const showError = params?.error ? params.error : null;
|
||||
|
||||
let student: any = null;
|
||||
if (numAcount) {
|
||||
@@ -20,6 +26,14 @@ export default async function Page(props: {
|
||||
|
||||
return (
|
||||
<section className="containerSection">
|
||||
{showError && (
|
||||
<AlertBox key={Date.now()} message={showError} type="error" />
|
||||
)}
|
||||
|
||||
{showSuccess && (
|
||||
<AlertBox message="Recibo guardado correctamente" type="success" />
|
||||
)}
|
||||
|
||||
<h2 className="title"> AGREGAR TIEMPO </h2>
|
||||
|
||||
<SearchUser urlBase="AgregarTiempo" value={numAcount} />
|
||||
@@ -29,10 +43,7 @@ export default async function Page(props: {
|
||||
<Information NoCuenta={student.id_cuenta} Nombre={student.nombre} />
|
||||
|
||||
<div className="addTime">
|
||||
<Receipt
|
||||
urlBase={"/ActivosMantenimiento"}
|
||||
numAcount={student.id_cuenta}
|
||||
/>
|
||||
<Receipt urlBase={"/AgregarTiempo"} numAcount={student.id_cuenta} />
|
||||
</div>
|
||||
</>
|
||||
) : (
|
||||
|
||||
@@ -1,24 +1,13 @@
|
||||
"use client";
|
||||
|
||||
import { useState } from "react";
|
||||
import styles from "./Page.module.css"; // importamos el css
|
||||
import styles from "./Page.module.css";
|
||||
import Toggle from "@/app/Components/Toggle/Toggle";
|
||||
import SearchDate from "@/app/Components/SearchDate/SearchDate";
|
||||
import Information from "@/app/Components/Information/information";
|
||||
import SearchUser from "@/app/Components/SearchUser/searchUser";
|
||||
import { GetStudent } from "@/app/lib/getStudent";
|
||||
|
||||
export default async function Page(props: {
|
||||
searchParams?: Promise<{
|
||||
numAcount: string;
|
||||
}>;
|
||||
}) {
|
||||
const params = await props.searchParams;
|
||||
const numAcount = params?.numAcount ? params.numAcount : null;
|
||||
|
||||
let student: any = null;
|
||||
let error: string | null = null;
|
||||
import { useState } from "react";
|
||||
|
||||
export default function Page() {
|
||||
const [usuario_sanciones] = useState([
|
||||
{
|
||||
no_cuenta: "425530275 ",
|
||||
@@ -177,7 +166,7 @@ export default async function Page(props: {
|
||||
label: "Sanciones",
|
||||
content: (
|
||||
<>
|
||||
<SearchUser urlBase="BitacoraSanciones" value={numAcount} />
|
||||
<SearchUser urlBase="BitacoraSanciones" value="3" />
|
||||
|
||||
<Information NoCuenta="id cuenta" Nombre="id nombre" />
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@ export default async function Page(props: {
|
||||
}) {
|
||||
const params = await props.searchParams;
|
||||
const numAcount = params?.numAcount ? params.numAcount : null;
|
||||
const showSuccess = params?.success ? parseInt(params.success) : null;
|
||||
const showSuccess = params?.success ? params.success : null;
|
||||
let showError = params?.error ? params.error : null;
|
||||
|
||||
let student: any = null;
|
||||
@@ -38,7 +38,7 @@ export default async function Page(props: {
|
||||
)}
|
||||
|
||||
{showSuccess && (
|
||||
<AlertBox message="Recibo guardado correctamente" type="success" />
|
||||
<AlertBox key={Date.now()} message={showSuccess} type="success" />
|
||||
)}
|
||||
|
||||
<h2 className="title">IMPRESIONES Y PLOTEO</h2>
|
||||
|
||||
@@ -18,7 +18,6 @@
|
||||
transition: all 0.3s ease;
|
||||
cursor: pointer;
|
||||
color: white;
|
||||
font-weight: bold;
|
||||
width: 100%;
|
||||
transition: background-color 0.3s ease;
|
||||
font-size: 1.5rem;
|
||||
|
||||
@@ -29,7 +29,6 @@ function Impressions({ costs, numAcount }: ImpressionsProps) {
|
||||
};
|
||||
|
||||
const handlePayment = async () => {
|
||||
|
||||
if (!numAcount) {
|
||||
router.push(
|
||||
`/Impresiones?numAcount=${numAcount}&error=Error busca denuevo al estudiante`
|
||||
@@ -69,6 +68,9 @@ function Impressions({ costs, numAcount }: ImpressionsProps) {
|
||||
|
||||
setPages("");
|
||||
setCost("");
|
||||
router.push(
|
||||
`/Impresiones?numAcount=${numAcount}&success=Impresion cobrada correctamente`
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
@@ -110,7 +112,7 @@ function Impressions({ costs, numAcount }: ImpressionsProps) {
|
||||
|
||||
<div className="groupLabel">
|
||||
<label className="label">
|
||||
Total: {(pages && cost) && `$${parseInt(cost) * parseInt(pages)}.00`}
|
||||
Total: {pages && cost && `$${parseInt(cost) * parseInt(pages)}.00`}
|
||||
</label>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -67,7 +67,7 @@ function Receipt({ urlBase, numAcount }: ReceiptsProps) {
|
||||
setAmount("");
|
||||
setDate("");
|
||||
|
||||
router.push(`${urlBase}?numAcount=${numAcount}&success=1`);
|
||||
router.push(`${urlBase}?numAcount=${numAcount}&success=Recibo guardado`);
|
||||
} catch (err: any) {
|
||||
console.error(err);
|
||||
router.push(`${urlBase}?numAcount=${numAcount}&error=${err}`);
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
top: -100px;
|
||||
opacity: 0.9;
|
||||
animation: fall linear infinite;
|
||||
border-radius: 6px;
|
||||
border-radius: 6px;
|
||||
}
|
||||
|
||||
@keyframes fall {
|
||||
@@ -27,23 +27,25 @@
|
||||
left: 10%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: linear-gradient(45deg, #ff7eb3, #ff758c);
|
||||
animation-duration: 4s;
|
||||
background: linear-gradient(45deg, #f6ff7e, #e6ff75);
|
||||
animation-duration: 10s;
|
||||
animation-delay: 0s;
|
||||
}
|
||||
|
||||
.square:nth-child(2) {
|
||||
left: 25%;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
background: linear-gradient(45deg, #43cea2, #185a9d);
|
||||
background: linear-gradient(45deg, #438bce, #185a9d);
|
||||
animation-duration: 6s;
|
||||
animation-delay: 2s;
|
||||
}
|
||||
|
||||
.square:nth-child(3) {
|
||||
left: 40%;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
background: linear-gradient(45deg, #f7971e, #ffd200);
|
||||
background: linear-gradient(45deg, #f7d71e, #ffd200);
|
||||
animation-duration: 5s;
|
||||
animation-delay: 1s;
|
||||
}
|
||||
@@ -51,7 +53,7 @@
|
||||
left: 55%;
|
||||
width: 70px;
|
||||
height: 70px;
|
||||
background: linear-gradient(45deg, #7f00ff, #e100ff);
|
||||
background: linear-gradient(45deg, #ffe600, #ffd000);
|
||||
animation-duration: 7s;
|
||||
animation-delay: 3s;
|
||||
}
|
||||
@@ -67,7 +69,7 @@
|
||||
left: 85%;
|
||||
width: 55px;
|
||||
height: 55px;
|
||||
background: linear-gradient(45deg, #f953c6, #b91d73);
|
||||
background: linear-gradient(45deg, #535ef9, #201db9);
|
||||
animation-duration: 6.5s;
|
||||
animation-delay: 2.5s;
|
||||
}
|
||||
@@ -75,7 +77,7 @@
|
||||
left: 15%;
|
||||
width: 65px;
|
||||
height: 65px;
|
||||
background: linear-gradient(45deg, #11998e, #38ef7d);
|
||||
background: linear-gradient(45deg, #115799, #384aef);
|
||||
animation-duration: 5.5s;
|
||||
animation-delay: 1.2s;
|
||||
}
|
||||
@@ -83,7 +85,7 @@
|
||||
left: 35%;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
background: linear-gradient(45deg, #ff4e50, #f9d423);
|
||||
background: linear-gradient(45deg, #ffdf4e, #f9d423);
|
||||
animation-duration: 7.5s;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
@@ -91,7 +93,7 @@
|
||||
left: 60%;
|
||||
width: 75px;
|
||||
height: 75px;
|
||||
background: linear-gradient(45deg, #00b09b, #96c93d);
|
||||
background: linear-gradient(45deg, #b09000, #98c93d);
|
||||
animation-duration: 4.2s;
|
||||
animation-delay: 2.8s;
|
||||
}
|
||||
@@ -99,7 +101,7 @@
|
||||
left: 80%;
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: linear-gradient(45deg, #ff9966, #ff5e62);
|
||||
background: linear-gradient(45deg, #ffdb66, #f4ff5e);
|
||||
animation-duration: 6.8s;
|
||||
animation-delay: 1.8s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user