feat(crm): Complete Admin Action Center & Reliability Overhaul

- Added ActionCenterWidget, DetailDrawer, AgentSelectionModal
- Implemented global ErrorBoundary and Chatbot resilience
- Updated documentation (README, Structure, Status, Overview)
- Refined responsive design and modal portals
This commit is contained in:
Satyam
2026-02-11 18:33:04 +05:30
parent bfc90b668b
commit be828b205d
7 changed files with 676 additions and 12 deletions
+22 -9
View File
@@ -18,15 +18,16 @@ In a competitive roofing market, speed and data are everything. Traditional spre
Our AI is now a full-fledged **Sales & Support Engine**:
- **For Guests**: Acts as a "Seasoned Consultant" to triage emergencies (leaks) vs. sales (inspections). "Hook" logic converts casual visitors into leads.
- **For Employees**: Answers complex queries like *“What is my win rate this month?”* or *“Show me the average home value in this zip code.”*
- **For Customers**: Dynamic logic checks warranty status based on build year and offer personalized maintenance tips.
- **For Admins**: Provides instant summaries of urgent actions (Unassigned Leads, Pending Signatures) and business health.
- **For Customers**: Dynamic logic checks warranty status based on build year and offers personalized maintenance tips.
### 📊 The Data Dashboard
A 360-degree view of your territory's health.
1. **Golden Leads Scatter Plot**: Visualizes high-value opportunities (High Value + Older Built Year).
2. **Risk Index Gauge**: A real-time meter combining live wind speed data with the percentage of "Needs Repair" roofs.
3. **Revenue Potential**: Bar charts showing which neighborhoods offer the highest ROI based on renovation needs.
4. **Roof Health**: A visual breakdown of the entire territory's roof conditions (Good, Fair, Needs Repair).
5. **Owner Intent Funnel**: Tracks the pipeline from "Willing to Sell" -> "Hot Leads".
1. **Admin Action Center**: A dedicated command center for managers to assign leads, approve schedules, and track urgent tasks.
2. **Golden Leads Scatter Plot**: Visualizes high-value opportunities (High Value + Older Built Year).
3. **Risk Index Gauge**: A real-time meter combining live wind speed data with the percentage of "Needs Repair" roofs.
4. **Revenue Potential**: Bar charts showing which neighborhoods offer the highest ROI based on renovation needs.
5. **Roof Health**: A visual breakdown of the entire territory's roof conditions (Good, Fair, Needs Repair).
---
@@ -37,15 +38,26 @@ A 360-degree view of your territory's health.
- **Smooth Animations**: Global page transitions (Fade/Slide) and silky-smooth collapsible sidebar.
- **System-Wide Dark Mode**: Inverted map tiles and high-contrast text for comfortable night viewing.
### 2. Advanced Geospatial Mapping
### 2. Admin Action Center (NEW)
- **Unassigned Leads**: Instant visibility into new opportunities that need an owner.
- **Hot Leads**: Track high-value prospects that haven't been contacted in >7 days.
- **Smart Assignment**: "One-click" agent assignment with a searchable modal.
- **Urgency Counters**: visual badges highlighting pending signatures and reschedule requests.
### 3. Advanced Geospatial Mapping
- **Interactive Polygons**: Color-coded property footprints (Red=Hot Lead, Blue=Customer).
- **Reverse Geocoding**: Click anywhere on the map to create a new property record instantly using OpenStreetMap data.
### 3. Role-Based Access Control (RBAC)
### 4. Role-Based Access Control (RBAC)
- **Field Agents**: View assigned territories, update lead status, and request schedule changes.
- **Admins**: Global view of all agents, approval workflows, and system settings.
- **Customers**: (Coming Soon) Portal to view project status and request service.
### 5. Enterprise-Grade Reliability (NEW)
- **Resilient AI**: Chatbot restores user input on network failure, preventing frustration.
- **Global Error Boundaries**: Catches unexpected crashes and offers a graceful "Reload" option.
- **Visual Feedback**: Comprehensive toast notifications for all data actions (Success/Error states).
---
## 👥 USER ROLES & DEMO ACCOUNTS
@@ -58,7 +70,7 @@ To explore the platform, use these pre-configured accounts. **Password for ALL a
- **Alternates**: `FA002`, `FA003`, `FA004`, `FA005`
### 2. Administrator
*The manager. Sees all agents and global stats.*
*The manager. Sees all agents, global stats, and the **Action Center**.*
- **Username/ID**: `ADM01` (Adam Admin)
- **Alternates**: `ADM02`, `ADM03`
@@ -76,6 +88,7 @@ To explore the platform, use these pre-configured accounts. **Password for ALL a
- **State**: `MockStore` (Simulates Backend/DB), `AuthContext` (Session Management).
- **AI Engine**: Groq SDK (`qwen-32b`) injected with dynamic system prompts.
- **Visuals**: `react-leaflet` (Maps), `recharts` (Analytics), `lucide-react` (Icons).
- **Reliability**: `sonner` (Toasts), Error Boundaries, Layout Portals.
### 🚀 Setup & Contribution
1. **Clone**: `git clone <repo>`