From 1e081dfe791d3bfc8c718be638f19f8fdba0eb3f Mon Sep 17 00:00:00 2001
From: IO420 <320154041@pcpuma.acatlan.unam.mx>
Date: Mon, 22 Sep 2025 12:15:32 -0400
Subject: [PATCH] new style and fixed request
---
.example.txt | 1 -
app/(private)/AgregarTiempo/page.tsx | 8 ++---
app/(private)/BitacoraSanciones/page.tsx | 2 +-
app/(private)/Impresiones/page.tsx | 16 +++++-----
app/(private)/Inscripciones/page.tsx | 8 ++---
app/Components/Impressions/impressions.tsx | 8 ++---
app/Components/Receipt/Receipt.tsx | 8 ++---
app/Components/SearchUser/searchUser.tsx | 10 +++---
app/globals.css | 37 ++++++++++++++++++++--
app/lib/getStudent.ts | 4 +--
10 files changed, 67 insertions(+), 35 deletions(-)
delete mode 100644 .example.txt
diff --git a/.example.txt b/.example.txt
deleted file mode 100644
index 4b73e25..0000000
--- a/.example.txt
+++ /dev/null
@@ -1 +0,0 @@
-NEXT_PUBLIC_API_URL=
\ No newline at end of file
diff --git a/app/(private)/AgregarTiempo/page.tsx b/app/(private)/AgregarTiempo/page.tsx
index e74906e..357d2ba 100644
--- a/app/(private)/AgregarTiempo/page.tsx
+++ b/app/(private)/AgregarTiempo/page.tsx
@@ -12,11 +12,11 @@ export default async function Page(props:{
}) {
const params =await props.searchParams;
- const numAccount = params?.numAcount ? parseInt(params.numAcount) : null;
+ const numAcount = params?.numAcount ? parseInt(params.numAcount) : null;
let student: any = null;
- if (numAccount) {
- student = await GetStudent(numAccount);
+ if (numAcount) {
+ student = await GetStudent(numAcount);
}
return (
@@ -30,7 +30,7 @@ export default async function Page(props:{
-
+
>
) : (
diff --git a/app/(private)/BitacoraSanciones/page.tsx b/app/(private)/BitacoraSanciones/page.tsx
index 133d7c9..d9c8234 100644
--- a/app/(private)/BitacoraSanciones/page.tsx
+++ b/app/(private)/BitacoraSanciones/page.tsx
@@ -14,7 +14,7 @@ export default async function Page(props:{
}>
}) {
const params =await props.searchParams;
- const numAccount = params?.numAcount ? parseInt(params.numAcount) : null;
+ const numAcount = params?.numAcount ? parseInt(params.numAcount) : null;
let student: any = null;
let error: string | null = null;
diff --git a/app/(private)/Impresiones/page.tsx b/app/(private)/Impresiones/page.tsx
index b64610f..715ce2b 100644
--- a/app/(private)/Impresiones/page.tsx
+++ b/app/(private)/Impresiones/page.tsx
@@ -14,12 +14,12 @@ export default async function Page(props: {
}>;
}) {
const params = await props.searchParams;
- const numAccount = params?.numAcount ? parseInt(params.numAcount) : null;
+ const numAcount = params?.numAcount ? parseInt(params.numAcount) : null;
let student: any = null;
let error: string | null = null;
- if (numAccount) {
- const result = await GetStudent(numAccount);
+ if (numAcount) {
+ const result = await GetStudent(numAcount);
if (result.error) {
error = result.error;
@@ -50,7 +50,7 @@ export default async function Page(props: {
{
key: "1",
label: "Recibo",
- content: ,
+ content: ,
},
{
key: "2",
@@ -58,7 +58,7 @@ export default async function Page(props: {
content: (
),
},
@@ -77,7 +77,7 @@ export default async function Page(props: {
{ value: 12 },
{ value: 14 },
]}
- numAccount={student.id_cuenta}
+ numAcount={student.id_cuenta}
/>
),
},
@@ -105,7 +105,7 @@ export default async function Page(props: {
{ value: 150 },
{ value: 200 },
]}
- numAccount={student.id_cuenta}
+ numAcount={student.id_cuenta}
/>
),
},
@@ -115,7 +115,7 @@ export default async function Page(props: {
content: (
),
},
diff --git a/app/(private)/Inscripciones/page.tsx b/app/(private)/Inscripciones/page.tsx
index 761cca2..2fac6cc 100644
--- a/app/(private)/Inscripciones/page.tsx
+++ b/app/(private)/Inscripciones/page.tsx
@@ -14,12 +14,12 @@ export default async function Page(props:{
}) {
const params =await props.searchParams;
- const numAccount = params?.numAcount ? parseInt(params.numAcount) : null;
+ const numAcount = params?.numAcount ? parseInt(params.numAcount) : null;
let student: any = null;
let error: string | null = null;
- if (numAccount) {
- const result = await GetStudent(numAccount);
+ if (numAcount) {
+ const result = await GetStudent(numAcount);
if (result.error) {
error = result.error;
@@ -45,7 +45,7 @@ export default async function Page(props:{
-
+
>
) : (
diff --git a/app/Components/Impressions/impressions.tsx b/app/Components/Impressions/impressions.tsx
index 9f0baa5..ed38e5b 100644
--- a/app/Components/Impressions/impressions.tsx
+++ b/app/Components/Impressions/impressions.tsx
@@ -14,10 +14,10 @@ interface CostOption {
interface ImpressionsProps {
costs: CostOption[];
- numAccount: number | null;
+ numAcount: number | null;
}
-function Impressions({ costs, numAccount }: ImpressionsProps) {
+function Impressions({ costs, numAcount }: ImpressionsProps) {
const [pages, setPages] = useState("");
const [cost, setCost] = useState("");
@@ -33,7 +33,7 @@ function Impressions({ costs, numAccount }: ImpressionsProps) {
const handlePayment = async () => {
setError("");
- if (!numAccount) {
+ if (!numAcount) {
setError("Error busca denuevo al estudiante");
return;
}
@@ -49,7 +49,7 @@ function Impressions({ costs, numAccount }: ImpressionsProps) {
}
const result = await PostImpressions({
- id_cuenta:numAccount,
+ id_cuenta:numAcount,
numero_hojas : parseInt(pages),
monto: parseInt(cost) * parseInt(pages),
});
diff --git a/app/Components/Receipt/Receipt.tsx b/app/Components/Receipt/Receipt.tsx
index ba453b5..0d19218 100644
--- a/app/Components/Receipt/Receipt.tsx
+++ b/app/Components/Receipt/Receipt.tsx
@@ -7,10 +7,10 @@ import Cookies from "js-cookie";
import "./Receipt.css";
interface ReceiptsProps {
- numAccount: number | null;
+ numAcount: number | null;
}
-function Receipt({ numAccount }: ReceiptsProps) {
+function Receipt({ numAcount }: ReceiptsProps) {
const [folio, setFolio] = useState("");
const [amount, setAmount] = useState("");
const [date, setDate] = useState("");
@@ -29,7 +29,7 @@ function Receipt({ numAccount }: ReceiptsProps) {
//restrict this month//
const handleSaveReceipt = () => {
- if (!numAccount) {
+ if (!numAcount) {
setError("Error busca denuevo al estudiante");
return;
}
@@ -50,7 +50,7 @@ function Receipt({ numAccount }: ReceiptsProps) {
}
PostReceipt({
- id_cuenta: numAccount,
+ id_cuenta: numAcount,
folio_recibo: folio,
monto: Number(amount),
fecha_recibo: date,
diff --git a/app/Components/SearchUser/searchUser.tsx b/app/Components/SearchUser/searchUser.tsx
index 74f01d4..6af7039 100644
--- a/app/Components/SearchUser/searchUser.tsx
+++ b/app/Components/SearchUser/searchUser.tsx
@@ -8,14 +8,14 @@ interface urlProp{
}
function SearchUser(url:urlProp) {
- const [numAccount, setNumAccount] = useState("");
+ const [numAcount, setnumAcount] = useState("");
const router = useRouter();
const handleSubmit = (e: React.FormEvent) => {
e.preventDefault();
- if (numAccount) {
- router.push(`/${url.urlBase}?numAccount=${numAccount}`);
+ if (numAcount) {
+ router.push(`/${url.urlBase}?numAcount=${numAcount}`);
}
};
@@ -27,11 +27,11 @@ function SearchUser(url:urlProp) {
{
const value = e.target.value;
if (/^\d*$/.test(value) && value.length <= 9) {
- setNumAccount(value);
+ setnumAcount(value);
}
}}
placeholder="Coloca un nĂºmero de cuenta..."
diff --git a/app/globals.css b/app/globals.css
index 86aef13..b4aec32 100644
--- a/app/globals.css
+++ b/app/globals.css
@@ -13,6 +13,7 @@
html {
box-sizing: border-box;
font-size: 62.5%;
+ overflow-y: auto;
}
body {
@@ -101,7 +102,7 @@ footer p {
border-radius: 4px;
width: 90%;
max-width: 1150px;
- height: 550px;
+ height: 600px;
min-height: 520px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
overflow: hidden;
@@ -297,13 +298,14 @@ form {
.toggleButton {
flex: 1;
- padding: 0.5rem 1rem;
background-color: transparent;
border: none;
cursor: pointer;
border-radius: 4px;
transition: background-color 0.3s, color 0.3s;
font-weight: 500;
+ overflow-y: hidden;
+ max-height: 60px;
}
.toggleButton.active {
@@ -379,6 +381,12 @@ table tr {
width: 100%;
}
+@media(max-width: 1330px) {
+ .mainContainer {
+ grid-template-rows: 60px 1fr;
+ }
+}
+
@media (max-width: 1300px) {
.container {
width: 100%;
@@ -402,6 +410,10 @@ table tr {
border-radius: 0;
}
+ .mainContainer {
+ grid-template-rows: 40px 1fr;
+ }
+
.img {
right: 50%;
transform: translateX(50%);
@@ -447,6 +459,20 @@ table tr {
footer p {
font-size: 1.2rem;
}
+
+ label {
+ font-size: 1.5rem;
+ }
+
+ input,
+ select {
+ font-size: 1.5rem;
+ }
+
+ button {
+ font-size: 1.5rem;
+ padding: 1rem 1.5rem;
+}
}
@media (max-height: 960px) {
@@ -454,3 +480,10 @@ table tr {
margin: 0;
}
}
+
+@media (max-width: 450px) {
+ .title {
+ max-width: 300px;
+ overflow-wrap: break-word;
+ }
+}
\ No newline at end of file
diff --git a/app/lib/getStudent.ts b/app/lib/getStudent.ts
index 756ea2c..5e0f4f5 100644
--- a/app/lib/getStudent.ts
+++ b/app/lib/getStudent.ts
@@ -1,9 +1,9 @@
import axios from "axios";
import { envConfig } from "./config";
-export async function GetStudent(numAccount: number) {
+export async function GetStudent(numAcount: number) {
try {
- const response = await axios.get(`${envConfig.apiUrl}/student/${numAccount}`);
+ const response = await axios.get(`${envConfig.apiUrl}/student/${numAcount}`);
console.log(response.data)
return response.data;
} catch (error: any) {