diff --git a/diplomas/package-lock.json b/diplomas/package-lock.json index c90d0ae..9c0b691 100644 --- a/diplomas/package-lock.json +++ b/diplomas/package-lock.json @@ -28,11 +28,13 @@ "lucide-react": "^0.488.0", "mysql2": "^3.14.1", "next": "15.3.0", + "next-themes": "^0.4.6", "papaparse": "^5.5.2", "qrcode": "^1.5.4", "react": "^19.0.0", "react-dom": "^19.0.0", "react-hook-form": "^7.56.2", + "sonner": "^2.0.5", "tailwind-merge": "^3.2.0", "tw-animate-css": "^1.2.5", "xlsx": "^0.18.5", @@ -6317,6 +6319,15 @@ } } }, + "node_modules/next-themes": { + "version": "0.4.6", + "resolved": "https://registry.npmjs.org/next-themes/-/next-themes-0.4.6.tgz", + "integrity": "sha512-pZvgD5L0IEvX5/9GWyHMf3m8BKiVQwsCMHfoFosXtXBMnaS0ZnIJ9ST4b4NqLVKDEm8QBxoNNGNaBv2JNF6XNA==", + "peerDependencies": { + "react": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc", + "react-dom": "^16.8 || ^17 || ^18 || ^19 || ^19.0.0-rc" + } + }, "node_modules/next/node_modules/postcss": { "version": "8.4.31", "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", @@ -7399,6 +7410,15 @@ "is-arrayish": "^0.3.1" } }, + "node_modules/sonner": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/sonner/-/sonner-2.0.5.tgz", + "integrity": "sha512-YwbHQO6cSso3HBXlbCkgrgzDNIhws14r4MO87Ofy+cV2X7ES4pOoAK3+veSmVTvqNx1BWUxlhPmZzP00Crk2aQ==", + "peerDependencies": { + "react": "^18.0.0 || ^19.0.0 || ^19.0.0-rc", + "react-dom": "^18.0.0 || ^19.0.0 || ^19.0.0-rc" + } + }, "node_modules/source-map-js": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", diff --git a/diplomas/package.json b/diplomas/package.json index c322137..c6c37ed 100644 --- a/diplomas/package.json +++ b/diplomas/package.json @@ -29,11 +29,13 @@ "lucide-react": "^0.488.0", "mysql2": "^3.14.1", "next": "15.3.0", + "next-themes": "^0.4.6", "papaparse": "^5.5.2", "qrcode": "^1.5.4", "react": "^19.0.0", "react-dom": "^19.0.0", "react-hook-form": "^7.56.2", + "sonner": "^2.0.5", "tailwind-merge": "^3.2.0", "tw-animate-css": "^1.2.5", "xlsx": "^0.18.5", diff --git a/diplomas/src/components/dialogs/vistaPreviaDiplomaDialog.jsx b/diplomas/src/components/dialogs/vistaPreviaDiplomaDialog.jsx index 25aa7cc..f8be412 100644 --- a/diplomas/src/components/dialogs/vistaPreviaDiplomaDialog.jsx +++ b/diplomas/src/components/dialogs/vistaPreviaDiplomaDialog.jsx @@ -13,6 +13,7 @@ import { useForm } from "react-hook-form"; import { mensajesSchema } from "@/schemas/mensajesSchema"; import { Textarea } from "../ui/textarea"; import QRCode from "qrcode"; +import { toast } from "sonner"; function VistaPreviaDiplomaDialog({ open, @@ -105,6 +106,7 @@ function VistaPreviaDiplomaDialog({ } setMensaje("Mensajes guardados correctamente."); + toast.success("Mensajes guardados correctamente."); }; useEffect(() => { @@ -216,7 +218,7 @@ function VistaPreviaDiplomaDialog({ return ( - + Diploma @@ -331,7 +333,7 @@ function VistaPreviaDiplomaDialog({ {/* Vista previa PDF */} {mostrarVistaPrevia && (
-
+
{ + const { theme = "system" } = useTheme() + + return ( + () + ); +} + +export { Toaster } diff --git a/diplomas/src/pages/_app.js b/diplomas/src/pages/_app.js index b97e52f..79d88a9 100644 --- a/diplomas/src/pages/_app.js +++ b/diplomas/src/pages/_app.js @@ -1,5 +1,11 @@ import "@/styles/globals.css"; +import { Toaster } from "sonner"; export default function App({ Component, pageProps }) { - return ; + return ( + <> + + ; + + ); } diff --git a/diplomas/src/pages/alumnosVista.jsx b/diplomas/src/pages/alumnosVista.jsx index c7f607b..0fe726f 100644 --- a/diplomas/src/pages/alumnosVista.jsx +++ b/diplomas/src/pages/alumnosVista.jsx @@ -334,7 +334,7 @@ export default function AlumnosVista() { {alumno.tipo_formacion === "pildora" && alumno.pildoras?.nombre} - +