diff --git a/app/(private)/ActivosMantenimiento/page.tsx b/app/(private)/ActivosMantenimiento/page.tsx index 7687c5b..e6cdf48 100644 --- a/app/(private)/ActivosMantenimiento/page.tsx +++ b/app/(private)/ActivosMantenimiento/page.tsx @@ -13,7 +13,6 @@ export default function Page(props: { const params = props.searchParams; const [tiempo, setTiempo] = useState(""); - const [selectedTable, setSelectedTable] = useState(null); return (
diff --git a/app/Components/AlertBox/AlertBox.tsx b/app/Components/AlertBox/AlertBox.tsx index c9181a2..e8863ea 100644 --- a/app/Components/AlertBox/AlertBox.tsx +++ b/app/Components/AlertBox/AlertBox.tsx @@ -1,4 +1,4 @@ -'use client' +"use client"; import { useEffect, useState } from "react"; import "./AlertBox.css"; @@ -9,7 +9,11 @@ interface AlertBoxProps { duration?: number; } -export default function AlertBox({ message, type, duration = 6000 }: AlertBoxProps) { +export default function AlertBox({ + message, + type, + duration = 6000, +}: AlertBoxProps) { const [visible, setVisible] = useState(false); const [text, setText] = useState(""); diff --git a/app/Components/Logout/Logout.tsx b/app/Components/Logout/Logout.tsx index 8fa3fc0..3f8ab15 100644 --- a/app/Components/Logout/Logout.tsx +++ b/app/Components/Logout/Logout.tsx @@ -14,8 +14,11 @@ export default function Logout() { }; return ( - + <> +

+ + ); } diff --git a/app/Components/Receipt/Receipt.tsx b/app/Components/Receipt/Receipt.tsx index 67bc02b..96d81a5 100644 --- a/app/Components/Receipt/Receipt.tsx +++ b/app/Components/Receipt/Receipt.tsx @@ -7,11 +7,11 @@ import { useRouter } from "next/navigation"; import "./Receipt.css"; interface ReceiptsProps { - urlBase:string; + urlBase: string; numAcount: number | null; } -function Receipt({urlBase , numAcount }: ReceiptsProps) { +function Receipt({ urlBase, numAcount }: ReceiptsProps) { const router = useRouter(); const [folio, setFolio] = useState(""); @@ -31,27 +31,27 @@ function Receipt({urlBase , numAcount }: ReceiptsProps) { const handleSaveReceipt = async () => { if (!numAcount) { router.push( - `/${urlBase}?numAcount=${numAcount}&error=Error busca denuevo al estudiante` + `${urlBase}?numAcount=${numAcount}&error=Error busca denuevo al estudiante` ); return; } if (!folio) { router.push( - `/${urlBase}?numAcount=${numAcount}&error=Ingresa el folio del tiket` + `${urlBase}?numAcount=${numAcount}&error=Ingresa el folio del tiket` ); return; } if (!amount) { router.push( - `/${urlBase}?numAcount=${numAcount}&error=coloca el monto a depositar` + `${urlBase}?numAcount=${numAcount}&error=coloca el monto a depositar` ); return; } if (!date) { - router.push(`/${urlBase}?numAcount=${numAcount}&error=coloca la fecha`); + router.push(`${urlBase}?numAcount=${numAcount}&error=coloca la fecha`); return; } @@ -67,10 +67,10 @@ function Receipt({urlBase , numAcount }: ReceiptsProps) { setAmount(""); setDate(""); - router.push(`/${urlBase}?numAcount=${numAcount}&success=1`); + router.push(`${urlBase}?numAcount=${numAcount}&success=1`); } catch (err: any) { console.error(err); - router.push(`/${urlBase}?numAcount=${numAcount}&error=${err}`); + router.push(`${urlBase}?numAcount=${numAcount}&error=${err}`); } }; @@ -87,8 +87,8 @@ function Receipt({urlBase , numAcount }: ReceiptsProps) { { - const value = e.target.value; + onChange={(error) => { + const value = error.target.value; if (/^\d*$/.test(value)) { setFolio(value); } diff --git a/app/Components/FallingSquares/FallingSquares.tsx b/app/Components/visual/Wave/FallingSquares/FallingSquares.tsx similarity index 100% rename from app/Components/FallingSquares/FallingSquares.tsx rename to app/Components/visual/Wave/FallingSquares/FallingSquares.tsx diff --git a/app/Components/FallingSquares/style.css b/app/Components/visual/Wave/FallingSquares/style.css similarity index 100% rename from app/Components/FallingSquares/style.css rename to app/Components/visual/Wave/FallingSquares/style.css diff --git a/app/Components/Wave/wave.module.css b/app/Components/visual/Wave/wave.module.css similarity index 100% rename from app/Components/Wave/wave.module.css rename to app/Components/visual/Wave/wave.module.css diff --git a/app/Components/Wave/wavesBack.tsx b/app/Components/visual/Wave/wavesBack.tsx similarity index 100% rename from app/Components/Wave/wavesBack.tsx rename to app/Components/visual/Wave/wavesBack.tsx diff --git a/app/layout.tsx b/app/layout.tsx index 15d5c4d..c4e3b34 100644 --- a/app/layout.tsx +++ b/app/layout.tsx @@ -2,9 +2,9 @@ import type { Metadata } from "next"; import { Poppins } from "next/font/google"; import Header from "./Components/Header/Header"; import Footer from "./Components/Footer/Footer"; -import WavesBackground from "./Components/Wave/wavesBack"; -import "./globals.css"; -import FallingSquares from "./Components/FallingSquares/FallingSquares"; +import WavesBackground from "./Components/visual/Wave/wavesBack"; +import FallingSquares from "./Components/visual/Wave/FallingSquares/FallingSquares"; +import "./globals.css"; const poppins = Poppins({ variable: "--font-poppins", @@ -29,7 +29,7 @@ export default function RootLayout({
- + {children}
@@ -38,4 +38,4 @@ export default function RootLayout({ ); } -//IO \ No newline at end of file +//IO diff --git a/app/lib/apiClient.ts b/app/lib/apiClient.ts index 5fd0104..0ffd831 100644 --- a/app/lib/apiClient.ts +++ b/app/lib/apiClient.ts @@ -11,7 +11,6 @@ const apiClient = axios.create({ apiClient.interceptors.request.use((config) => { const token = Cookies.get("token"); - console.log(token) if (token) { if (config.headers && "set" in config.headers) { config.headers.set("Authorization", `Bearer ${token}`); @@ -21,3 +20,4 @@ apiClient.interceptors.request.use((config) => { }); export default apiClient; +//IO diff --git a/app/lib/config.ts b/app/lib/config.ts index 8e4f59b..365b865 100644 --- a/app/lib/config.ts +++ b/app/lib/config.ts @@ -1,3 +1,4 @@ export const envConfig = { apiUrl: process.env.NEXT_PUBLIC_API_URL, }; +//IO diff --git a/app/lib/getStudent.ts b/app/lib/getStudent.ts index 5e0f4f5..4107a84 100644 --- a/app/lib/getStudent.ts +++ b/app/lib/getStudent.ts @@ -3,8 +3,9 @@ import { envConfig } from "./config"; export async function GetStudent(numAcount: number) { try { - const response = await axios.get(`${envConfig.apiUrl}/student/${numAcount}`); - console.log(response.data) + const response = await axios.get( + `${envConfig.apiUrl}/student/${numAcount}` + ); return response.data; } catch (error: any) { const msg = @@ -14,3 +15,4 @@ export async function GetStudent(numAcount: number) { return { error: msg }; } } +//IO diff --git a/app/lib/login.ts b/app/lib/login.ts index b32f0db..5cba2a7 100644 --- a/app/lib/login.ts +++ b/app/lib/login.ts @@ -16,3 +16,4 @@ export async function loginUser(usuario: string, password: string) { return { error: msg }; } } +//IO diff --git a/app/lib/postImpressions.ts b/app/lib/postImpressions.ts index 5cc2a5c..87224e1 100644 --- a/app/lib/postImpressions.ts +++ b/app/lib/postImpressions.ts @@ -12,3 +12,4 @@ export async function PostImpressions(data: any) { return { error: msg }; } } +//IO diff --git a/app/lib/postReceipt.ts b/app/lib/postReceipt.ts index 6c39e74..099ccd4 100644 --- a/app/lib/postReceipt.ts +++ b/app/lib/postReceipt.ts @@ -3,7 +3,6 @@ import apiClient from "./apiClient"; export async function PostReceipt(data: any) { try { const response = await apiClient.post("/operations/receipt", data); - console.log(response.data); return response.data; } catch (error: any) { const msg = @@ -13,3 +12,4 @@ export async function PostReceipt(data: any) { return { error: msg }; } } +//IO