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: