From 69dacbe188c67e54f08ca31b9302d7bd3b6f43d4 Mon Sep 17 00:00:00 2001 From: "gpt-engineer-app[bot]" <159125892+gpt-engineer-app[bot]@users.noreply.github.com> Date: Sat, 13 Dec 2025 11:55:24 +0000 Subject: [PATCH] Changes --- index.html | 28 +- src/App.tsx | 77 ++++-- src/components/drugs/DrugCard.tsx | 173 ++++++++++++ src/components/layout/BottomNav.tsx | 40 +++ src/components/layout/Header.tsx | 80 ++++++ src/components/layout/MenuSheet.tsx | 63 +++++ src/components/layout/SearchModal.tsx | 137 +++++++++ src/components/procedures/ProcedureCard.tsx | 147 ++++++++++ src/components/shared/Badge.tsx | 34 +++ src/components/shared/EmergencyButton.tsx | 48 ++++ src/components/tools/GlasgowCalculator.tsx | 83 ++++++ src/components/tools/InfusionTableView.tsx | 54 ++++ src/data/calculators.ts | 101 +++++++ src/data/drugs.ts | 174 ++++++++++++ src/data/procedures.ts | 200 ++++++++++++++ src/index.css | 259 ++++++++++++----- src/pages/Escena.tsx | 290 ++++++++++++++++++++ src/pages/Farmacos.tsx | 114 ++++++++ src/pages/Herramientas.tsx | 137 +++++++++ src/pages/Index.tsx | 142 +++++++++- src/pages/Patologias.tsx | 147 ++++++++++ src/pages/SoporteVital.tsx | 80 ++++++ tailwind.config.ts | 51 +++- 23 files changed, 2543 insertions(+), 116 deletions(-) create mode 100644 src/components/drugs/DrugCard.tsx create mode 100644 src/components/layout/BottomNav.tsx create mode 100644 src/components/layout/Header.tsx create mode 100644 src/components/layout/MenuSheet.tsx create mode 100644 src/components/layout/SearchModal.tsx create mode 100644 src/components/procedures/ProcedureCard.tsx create mode 100644 src/components/shared/Badge.tsx create mode 100644 src/components/shared/EmergencyButton.tsx create mode 100644 src/components/tools/GlasgowCalculator.tsx create mode 100644 src/components/tools/InfusionTableView.tsx create mode 100644 src/data/calculators.ts create mode 100644 src/data/drugs.ts create mode 100644 src/data/procedures.ts create mode 100644 src/pages/Escena.tsx create mode 100644 src/pages/Farmacos.tsx create mode 100644 src/pages/Herramientas.tsx create mode 100644 src/pages/Patologias.tsx create mode 100644 src/pages/SoporteVital.tsx diff --git a/index.html b/index.html index 38a5fa76..cae86c9a 100644 --- a/index.html +++ b/index.html @@ -1,22 +1,24 @@ - + - - - Lovable App - - + + EMERGES TES - Guía de Protocolos de Emergencias + + + + + - - - + + - - - - + + + + + diff --git a/src/App.tsx b/src/App.tsx index 18daf2e9..c6e91d87 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -1,27 +1,72 @@ +import { useState } from 'react'; import { Toaster } from "@/components/ui/toaster"; import { Toaster as Sonner } from "@/components/ui/sonner"; import { TooltipProvider } from "@/components/ui/tooltip"; import { QueryClient, QueryClientProvider } from "@tanstack/react-query"; import { BrowserRouter, Routes, Route } from "react-router-dom"; -import Index from "./pages/Index"; +import Header from "@/components/layout/Header"; +import BottomNav from "@/components/layout/BottomNav"; +import SearchModal from "@/components/layout/SearchModal"; +import MenuSheet from "@/components/layout/MenuSheet"; +import Home from "./pages/Index"; +import SoporteVital from "./pages/SoporteVital"; +import Patologias from "./pages/Patologias"; +import Escena from "./pages/Escena"; +import Farmacos from "./pages/Farmacos"; +import Herramientas from "./pages/Herramientas"; import NotFound from "./pages/NotFound"; const queryClient = new QueryClient(); -const App = () => ( - - - - - - - } /> - {/* ADD ALL CUSTOM ROUTES ABOVE THE CATCH-ALL "*" ROUTE */} - } /> - - - - -); +const App = () => { + const [isSearchOpen, setIsSearchOpen] = useState(false); + const [isMenuOpen, setIsMenuOpen] = useState(false); + + return ( + + + + + +
+
setIsSearchOpen(true)} + onMenuClick={() => setIsMenuOpen(true)} + /> + +
+
+ + setIsSearchOpen(true)} />} + /> + } /> + } /> + } /> + } /> + } /> + } /> + +
+
+ + + + setIsSearchOpen(false)} + /> + + setIsMenuOpen(false)} + /> +
+
+
+
+ ); +}; export default App; diff --git a/src/components/drugs/DrugCard.tsx b/src/components/drugs/DrugCard.tsx new file mode 100644 index 00000000..3c55b667 --- /dev/null +++ b/src/components/drugs/DrugCard.tsx @@ -0,0 +1,173 @@ +import { useState } from 'react'; +import { ChevronDown, ChevronUp, Star, Package, Syringe, User, Baby, AlertCircle } from 'lucide-react'; +import { Drug } from '@/data/drugs'; +import Badge from '@/components/shared/Badge'; +import { cn } from '@/lib/utils'; + +interface DrugCardProps { + drug: Drug; + defaultExpanded?: boolean; +} + +const DrugCard = ({ drug, defaultExpanded = false }: DrugCardProps) => { + const [isExpanded, setIsExpanded] = useState(defaultExpanded); + const [isFavorite, setIsFavorite] = useState(false); + + const toggleFavorite = (e: React.MouseEvent) => { + e.stopPropagation(); + setIsFavorite(!isFavorite); + }; + + return ( +
+ +
+ {isExpanded ? ( + + ) : ( + + )} +
+
+ + + + {isExpanded && ( +
+ {/* Presentation */} +
+ +
+

Presentación

+

{drug.presentation}

+
+
+ + {/* Adult Dose */} +
+ +
+

Dosis Adulto

+

{drug.adultDose}

+
+
+ + {/* Pediatric Dose */} + {drug.pediatricDose && ( +
+ +
+

Dosis Pediátrica

+

{drug.pediatricDose}

+
+
+ )} + + {/* Routes */} +
+ +
+

Vías de Administración

+
+ {drug.routes.map((route) => ( + + {route} + + ))} +
+
+
+ + {/* Dilution */} + {drug.dilution && ( +
+

Dilución

+

{drug.dilution}

+
+ )} + + {/* Indications */} +
+

+ Indicaciones +

+ +
+ + {/* Contraindications */} +
+

+ Contraindicaciones +

+ +
+ + {/* Antidote */} + {drug.antidote && ( +
+

+ Antídoto: {drug.antidote} +

+
+ )} + + {/* Notes */} + {drug.notes && drug.notes.length > 0 && ( +
+

Notas

+ +
+ )} +
+ )} + + ); +}; + +export default DrugCard; diff --git a/src/components/layout/BottomNav.tsx b/src/components/layout/BottomNav.tsx new file mode 100644 index 00000000..0b9ab89f --- /dev/null +++ b/src/components/layout/BottomNav.tsx @@ -0,0 +1,40 @@ +import { NavLink } from 'react-router-dom'; +import { Home, AlertTriangle, Stethoscope, Video, Pill, Wrench } from 'lucide-react'; + +interface NavItem { + path: string; + icon: React.ReactNode; + label: string; +} + +const navItems: NavItem[] = [ + { path: '/', icon: , label: 'Home' }, + { path: '/soporte-vital', icon: , label: 'Soporte' }, + { path: '/patologias', icon: , label: 'Patologías' }, + { path: '/escena', icon: