diff --git a/app/(private)/ActivosMantenimiento/page.tsx b/app/(private)/ActivosMantenimiento/page.tsx
index 658d7c9..2f0136d 100644
--- a/app/(private)/ActivosMantenimiento/page.tsx
+++ b/app/(private)/ActivosMantenimiento/page.tsx
@@ -1,21 +1,40 @@
-"use client";
-import SearchUser from "@/app/Components/SearchUser/searchUser";
-import Equipos from "@/app/Components/ActivosMantenimiento/Equipos";
-import Toggle from "@/app/Components/Toggle/Toggle";
import Areas from "@/app/Components/ActivosMantenimiento/Areas";
import Mesas from "@/app/Components/ActivosMantenimiento/Mesas";
+import Equipos from "@/app/Components/Equipos/equipos";
+import AlertBox from "@/app/Components/Global/AlertBox/AlertBox";
+import ClearParams from "@/app/Components/Global/ClearParams/ClearParams";
+import SearchUser from "@/app/Components/Global/SearchUser/searchUser";
+import Toggle from "@/app/Components/Global/Toggle/Toggle";
-export default function Page(props: {
+export default async function Page(props: {
searchParams?: Promise<{
- numAcount: string;
+ numAcount?: string;
+ machine?: string;
success?: string;
error?: string;
}>;
}) {
- const params = props.searchParams;
+ const params = await props.searchParams;
+ const numAcount = params?.numAcount ? params.numAcount : null;
+ const showSuccess = params?.success ? params.success : null;
+ const showError = params?.error ? params.error : null;
return (
+ {showError && (
+ <>
+
+
+ >
+ )}
+
+ {showSuccess && (
+ <>
+
+
+ >
+ )}
+
EQUIPOS ACTIVOS Y EN MANTENIMIENTO
-
+
>
),
@@ -54,3 +73,4 @@ export default function Page(props: {
);
}
+//IO
diff --git a/app/(private)/AgregarTiempo/page.tsx b/app/(private)/AgregarTiempo/page.tsx
index d3658bb..723498d 100644
--- a/app/(private)/AgregarTiempo/page.tsx
+++ b/app/(private)/AgregarTiempo/page.tsx
@@ -1,11 +1,12 @@
-import SearchUser from "@/app/Components/SearchUser/searchUser";
-import Information from "@/app/Components/Information/information";
+import SearchUser from "@/app/Components/Global/SearchUser/searchUser";
+import Information from "@/app/Components/Global/Information/information";
import Receipt from "@/app/Components/Receipt/Receipt";
-import AlertBox from "@/app/Components/AlertBox/AlertBox";
+import AlertBox from "@/app/Components/Global/AlertBox/AlertBox";
import { GetStudent } from "@/app/lib/getStudent";
import "./addTime.css";
+import ClearParams from "@/app/Components/Global/ClearParams/ClearParams";
export default async function Page(props: {
searchParams?: Promise<{
@@ -16,34 +17,46 @@ 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 showError = params?.error ? params.error : null;
+ const showSuccess = params?.success ? params.success : null;
+ let showError = params?.error ? params.error : null;
let student: any = null;
if (numAcount) {
- student = await GetStudent(parseInt(numAcount));
+ const result = await GetStudent(parseInt(numAcount));
+
+ if (result.error) {
+ showError = "Alumno no encontrado";
+ } else {
+ student = result;
+ }
}
return (
{showError && (
-
+ <>
+
+
+ >
)}
{showSuccess && (
-
+ <>
+
+
+ >
)}
AGREGAR TIEMPO
-
+
{student ? (
<>
-
+
>
) : (
diff --git a/app/(private)/Alta/page.tsx b/app/(private)/Alta/page.tsx
index acf3ec2..2e51c0a 100644
--- a/app/(private)/Alta/page.tsx
+++ b/app/(private)/Alta/page.tsx
@@ -1,91 +1,39 @@
-'use client'
-import { useState } from "react";
-import StepNavigator from "@/app/Components/StepNavigator/StepNavigator";
+import AlertBox from "@/app/Components/Global/AlertBox/AlertBox";
+import RegisterAlta from "@/app/Components/Alta/registerAlta";
-export default function Page() {
- const [step, setStep] = useState(1);
- const [major, setMajor] = useState("");
+import "./style.css";
+import ClearParams from "@/app/Components/Global/ClearParams/ClearParams";
- const handleNext = (e: any) => {
- e.preventDefault();
- if (step < 3) setStep(step + 1);
- };
-
- const handlePrev = (e: any) => {
- e.preventDefault();
- if (step > 1) setStep(step - 1);
- };
+export default async function Page(props: {
+ searchParams?: Promise<{
+ success?: string;
+ error?: string;
+ }>;
+}) {
+ const params = await props.searchParams;
+ const showSuccess = params?.success ? params.success : null;
+ const showError = params?.error ? params.error : null;
return (
+ {showError && (
+ <>
+
+
+ >
+ )}
+
+ {showSuccess && (
+ <>
+
+
+ >
+ )}
+
ALTA
- console.log()}>
-
-
-
-
-
+
+
);
}
-//IO
\ No newline at end of file
+//IO
diff --git a/app/(private)/Alta/style.css b/app/(private)/Alta/style.css
new file mode 100644
index 0000000..bf559d8
--- /dev/null
+++ b/app/(private)/Alta/style.css
@@ -0,0 +1,23 @@
+.gridAlta {
+ display: grid;
+ grid-template-columns: 1fr 1fr;
+}
+.containerAlta {
+ background-color: #f9f9f9;
+ width: 100%;
+ max-width: 900px;
+ padding: 1rem;
+ border-radius: 4px;
+}
+
+@media (max-width: 800px) {
+ .gridAlta {
+ grid-template-columns: 1fr;
+ justify-items: center;
+ min-width: max-content;
+ }
+
+ .containerAlta {
+ width: 80%;
+ }
+}
diff --git a/app/(private)/AsignacionEquipo/asignacionEquipos..css b/app/(private)/AsignacionEquipo/asignacionEquipos..css
deleted file mode 100644
index e73c9f3..0000000
--- a/app/(private)/AsignacionEquipo/asignacionEquipos..css
+++ /dev/null
@@ -1,29 +0,0 @@
-
-.availableTablesContainer {
- /* You can add specific styles for the table list here */
- width: 45%; /* Adjust width to fit the layout */
- background-color: #f9f9f9;
- border-radius: 8px;
- padding: 10px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
-}
-
-.tableList {
- list-style: none;
- padding: 0;
- display: flex;
- flex-direction: column; /* Or use flex-wrap to make it a grid */
- height: 200px; /* Or a fixed height with overflow */
- overflow-y: auto;
-}
-
-.tableList li {
- padding: 8px;
- border-bottom: 1px solid #ddd;
- cursor: pointer;
- transition: background-color 0.2s;
-}
-
-.tableList li:hover {
- background-color: #f0f0f0;
-}
diff --git a/app/(private)/AsignacionEquipo/page.tsx b/app/(private)/AsignacionEquipo/page.tsx
index f4160e9..7e4976d 100644
--- a/app/(private)/AsignacionEquipo/page.tsx
+++ b/app/(private)/AsignacionEquipo/page.tsx
@@ -1,10 +1,52 @@
-"use client";
-import SearchUser from "@/app/Components/SearchUser/searchUser";
-import Toggle from "@/app/Components/Toggle/Toggle";
+import AlertBox from "@/app/Components/Global/AlertBox/AlertBox";
+import ClearParams from "@/app/Components/Global/ClearParams/ClearParams";
+import SearchUser from "@/app/Components/Global/SearchUser/searchUser";
+import Toggle from "@/app/Components/Global/Toggle/Toggle";
+import { GetStudent } from "@/app/lib/getStudent";
+
+import '@/app/globals.css'
+
+export default async function Page(props: {
+ searchParams?: Promise<{
+ numAcount?: string;
+ machine?: string;
+ success?: string;
+ error?: string;
+ }>;
+}) {
+ const params = await props.searchParams;
+ const numAcount = params?.numAcount ? params.numAcount : null;
+ const machine = params?.machine ? params.machine : null;
+ const showSuccess = params?.success ? params.success : null;
+ const showError = params?.error ? params.error : null;
+
+ let student: any = null;
+
+ if (numAcount) {
+ const result = await GetStudent(parseInt(numAcount));
+
+ if (result.error) {
+ } else {
+ student = result;
+ }
+ }
-export default function Page() {
return (
);
}
+//IO
diff --git a/app/(private)/AsignacionMesas/asignacionmesas.css b/app/(private)/AsignacionMesas/asignacionmesas.css
deleted file mode 100644
index e73c9f3..0000000
--- a/app/(private)/AsignacionMesas/asignacionmesas.css
+++ /dev/null
@@ -1,29 +0,0 @@
-
-.availableTablesContainer {
- /* You can add specific styles for the table list here */
- width: 45%; /* Adjust width to fit the layout */
- background-color: #f9f9f9;
- border-radius: 8px;
- padding: 10px;
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
-}
-
-.tableList {
- list-style: none;
- padding: 0;
- display: flex;
- flex-direction: column; /* Or use flex-wrap to make it a grid */
- height: 200px; /* Or a fixed height with overflow */
- overflow-y: auto;
-}
-
-.tableList li {
- padding: 8px;
- border-bottom: 1px solid #ddd;
- cursor: pointer;
- transition: background-color 0.2s;
-}
-
-.tableList li:hover {
- background-color: #f0f0f0;
-}
diff --git a/app/(private)/AsignacionMesas/page.tsx b/app/(private)/AsignacionMesas/page.tsx
index 7551292..4396bbb 100644
--- a/app/(private)/AsignacionMesas/page.tsx
+++ b/app/(private)/AsignacionMesas/page.tsx
@@ -1,6 +1,6 @@
"use client";
-import SearchUser from "@/app/Components/SearchUser/searchUser";
-import Toggle from "@/app/Components/Toggle/Toggle";
+import SearchUser from "@/app/Components/Global/SearchUser/searchUser";
+import Toggle from "@/app/Components/Global/Toggle/Toggle";
import { useState } from "react";
export default function Page() {
@@ -18,7 +18,7 @@ export default function Page() {
label: "Asignar mesa",
content: (
<>
-
+