Added Messaging and Reports pages; connected Reports to n8n.

This commit is contained in:
Bruno Silva committed 2026-10-01 14:43:52 -04:00
1 parent 697d72f379
commit cb3325d6df
19 files changed
+3793 -21

No files matched your search

+13 -5
View File
@@ -33,10 +33,18 @@ graph TD
│ └── preload.js # Sandboxed script exposing restricted APIs to the renderer
├── src/
│ ├── assets/ # Client-side assets (e.g., country centroid JSON definitions)
│ ├── components/ # Reusable React UI components
│ ├── components/ # Reusable UI components
│ ├── lib/ # Utility libraries (PocketBase, Juvonno, vaccine calculators)
│ ├── pages/ # Application page views and screens
│ │ ├── Dashboard.jsx # Metrics cards and Live Patient Board list
│ │ ├── Sidebar.jsx # Navigation bar and user/physician profile context
│ │ └── LiveTracking.jsx # Interactive MapLibre world map & active patient logs
│ │ ├── LiveTracking.jsx # Interactive MapLibre world map & active patient logs
│ │ ├── Messaging.jsx # Patient email composer and n8n webhook dispatcher
│ │ ├── Notifications.jsx# Alerts and task notifications
│ │ ├── PreTravel.jsx # Pre-travel consultations and vaccine planning
│ │ ├── Records.jsx # Immunization records and patient dossiers
│ │ ├── Reports.jsx # Clinic reporting and analytics
│ │ ├── RiskAudit.jsx # Travel health risk assessment tool
│ │ └── Trips.jsx # Active trips and itinerary management
│ ├── App.jsx # App root layout shell & page navigation controller
│ ├── index.css # CSS styles, layout grid, CSS custom properties (variables)
│ └── main.jsx # React application entry point
@@ -49,14 +57,14 @@ graph TD
## Core Features
### 1. Interactive Patient World Map
Located in `src/components/LiveTracking.jsx`, this component renders patient destinations across the globe:
Located in `src/pages/LiveTracking.jsx`, this component renders patient destinations across the globe:
- **Centroid Coordinates**: Destructuring ISO-2 country codes (e.g., `TH`, `GH`, `MX`) to map them to coordinates using a centroid lookup dataset (`src/assets/countries.json`).
- **Interactive Markers**: Displays pulsed, color-coded rings corresponding to the patient's status. Clicking a marker centers the map using a smooth transition (`flyTo`) and displays a detailed information popup.
- **English Label Translation**: Coerces country names on the map to display in English.
- **Visual De-cluttering**: Automatically hides non-essential map layers (continents, states, roads, cities) when loading, leaving a clinical visual representation focused strictly on the patient country destinations.
### 2. Live Patient Board & Stats Dashboard
Located in `src/components/Dashboard.jsx`, this acts as the clinic's command center:
Located in `src/pages/Dashboard.jsx`, this acts as the clinic's command center:
- **Stat Cards**: Dynamic counters highlighting patient states (`In Pre-Travel`, `In Transit`, `At Risk`, `In Post-Travel`) with growth/decay indicators.
- **Live Board Table**: A tabular view of all patients, showing their email, scheduled departure/arrival dates, and status badges.