Commit Graph

102 Commits

Author SHA1 Message Date
Satyam Rastogi a03fb0cf00 chore(data): add DEMO_TODAY anchor and use it for kanban day-counter 2026-05-29 03:24:57 +05:30
Satyam Rastogi 73387366fe merge: integrate subcontractor, org-settings & commission features from project-refinement
# Conflicts:
#	src/App.jsx
#	src/components/Layout.jsx
#	src/data/mockStore.jsx
#	src/pages/LeadsListPage.jsx
#	src/pages/owner/OwnerProjectDetail.jsx
#	src/pages/owner/OwnerSnapshot.jsx
2026-05-29 01:11:03 +05:30
Satyam Rastogi 680b2b4cfe update correct url for admin/settings 2026-05-21 16:52:58 +05:30
Satyam Rastogi 5dd781ca45 subcontractor payments table added in owners box 2026-05-20 18:45:00 +05:30
Satyam Rastogi 2589975074 adds sections as list tasks,log expenses. fees, notifications for sub contrcator 2026-05-19 18:17:36 +05:30
Satyam-Rastogi ada58fa646 fix(storm-intel): center ZoneAssignmentModal using flex wrapper instead of translate 2026-05-18 18:33:15 +05:30
Satyam-Rastogi 84b1e73fa7 fix(storm-intel): modal z-index, zone click-to-zoom, drawer close on fly-to, left padding
- ZoneAssignmentModal: portal to document.body with z-9999 so it renders above Leaflet map stacking context
- ZoneLayer: clicking any zone polygon or centroid circle fits map bounds to that zone
- handleFlyTo: closes detail drawer after zooming so the map is unobstructed
- StormDetailDrawer: pl-5 on header, body, and footer for consistent left padding
2026-05-18 18:29:29 +05:30
Satyam-Rastogi 12bd2fe0de feat(storm-intel): Phase 4+5 — Tomorrow.io forecast overlay and canvasser zone assignment
- Tomorrow.io 7-day forecast strip with weather icons, storm score bar, and per-day risk color coding
- High-risk alert banner in forecast strip when any day scores >=65
- api/storm-forecast.js: Vercel proxy that reads TOMORROW_API_KEY server-side; graceful empty response when key unset
- useStormForecast hook: USE_MOCK=false with realistic MOCK_FORECAST fallback
- ZoneDrawingLayer: click-to-place polygon vertices using react-leaflet useMapEvents; disables double-click zoom while active; shows live vertex dots + dashed preview polygon
- ZoneLayer: renders stormZones as colored semi-transparent polygons with agent initials at centroid
- ZoneAssignmentModal: name + canvasser picker + color selector + optional storm link; portaled modal
- StormIntelPage: Draw Zone button (Admin/Owner only); drawing state/cancel flow; stormZones displayed on map; zone summary strip in sidebar; StormDetailDrawer has working "Draw Canvasser Zone" action
- FieldStormZonePage: canvasser mobile view at /field/storm-zones showing assigned zones with map, linked storm details, conversion window badge, and peak window alert
- Layout: Storm Zones entry in FIELD_AGENT nav
- App: /field/storm-zones route (FIELD_AGENT + Admin + Owner)
2026-05-18 18:06:17 +05:30
Satyam Rastogi c7a9849d1f add subcontractor task assign/list for admin and owner feature 2026-05-18 17:16:11 +05:30
Satyam-Rastogi 4cface49da feat(storm-intel): Phase 2 — storm-sourced lead generation flow
When a canvasser taps "Create Lead from Zone" in the Storm Intel detail drawer,
router state carries the storm context into CreateLeadPage:

- CreateLeadPage reads stormSource from location.state; initialises the form with
  city=Plano, state=TX, leadSource=Door Knock, urgency=high for significant/severe
  storms, and a pre-filled notes field with zone name, hail size, and date
- Amber storm banner renders below the page header showing zone name, hail size,
  and a note that urgency was auto-set; dismissible with X
- stormSource is saved on the lead object via the existing addLead spread
- LeadsListPage LeadCard shows an amber "Storm Zone" badge when lead.stormSource exists
- KanbanCard footer shows a compact amber "Storm" label for storm-sourced leads
2026-05-18 17:06:04 +05:30
Satyam-Rastogi 2e797c89f6 feat(storm-intel): Storm Intelligence Hub — Phase 1
Adds a new Storm Intel section to the sidebar and routes for ADMIN and OWNER roles.

- StormIntelPage: full-height layout with Leaflet map + storm polygon overlays,
  severity-coded color system, horizontal filter bar (date range / severity / sort),
  and a scrollable storm event list
- Storm detail drawer slides in from right with hail size, est. homes, days ago,
  conversion window indicator (Hot Zone / Warm / Cold / Too Fresh), intel text,
  and quick-action buttons (Create Lead, Open in Dispatch, Assign Canvassers stub)
- Clicking a storm card or map polygon zooms the map to that polygon and opens the drawer
- useStormEvents hook with USE_MOCK flag, date-range cutoff filter, type/severity filter,
  sort by date or severity, and conversionWindow() helper
- api/storm-events.js: NWS api.weather.gov proxy (free, no auth needed), parses
  GeoJSON polygons and hail size from alert descriptions
- MOCK_STORM_EVENTS: 7 realistic Plano TX storm events with accurate polygon coords
- Sidebar: CloudLightning "Storm Intel" entry added for OWNER and ADMIN nav
2026-05-18 16:49:37 +05:30
Satyam-Rastogi 9e2173fd43 feat(hail-recon): Hail Recon integration — storm intel panel, hail history, auto storm mode, address monitoring 2026-05-18 15:50:59 +05:30
Satyam Rastogi 686325dedb bug-fix/filter dropdowns in dark mode 2026-05-15 18:59:12 +05:30
Satyam-Rastogi 912967fa3a bug-fix/filter dropdowns in dark mode 2026-05-15 18:59:12 +05:30
Satyam Rastogi 2796d2ddb8 adds filter in org commission distribution panel 2026-05-15 18:50:22 +05:30
Satyam-Rastogi d2774b4a1e adds filter in org commission distribution panel 2026-05-15 18:50:22 +05:30
Satyam Rastogi a85b90d283 redesigned createItemModal with responsive and light /dark mode 2026-05-15 15:19:51 +05:30
Satyam-Rastogi 932e1bdbaa redesigned createItemModal with responsive and light /dark mode 2026-05-15 15:19:51 +05:30
Satyam Rastogi ff35b3076b apply commission setting model light mode 2026-05-15 15:06:16 +05:30
Satyam-Rastogi a9d3d1ce48 apply commission setting model light mode 2026-05-15 15:06:16 +05:30
Satyam Rastogi d2be9b1abf responsive new lead forms 2026-05-15 14:30:37 +05:30
Satyam-Rastogi eb34ec4cb3 responsive new lead forms 2026-05-15 14:30:37 +05:30
Satyam Rastogi 949d96a7c7 add leaderboard for canvassar 2026-05-15 12:05:05 +05:30
Satyam-Rastogi b1fdda407d add leaderboard for canvassar 2026-05-15 12:05:05 +05:30
Satyam Rastogi cef4be74b8 adds on /off commission for team members in jobs,when comm is on then owner can edit comm 2026-05-14 19:08:31 +05:30
Satyam-Rastogi 00e9c2af00 adds on /off commission for team members in jobs,when comm is on then owner can edit comm 2026-05-14 19:08:31 +05:30
Satyam Rastogi 7525871510 org team managment removed promotion demotion infor section from org Settings page 2026-05-14 18:21:13 +05:30
Satyam-Rastogi ef9fa1a401 org team managment removed promotion demotion infor section from org Settings page 2026-05-14 18:21:13 +05:30
Satyam Rastogi 72be14369e access control by role plus by person in orgsettings 2026-05-14 18:13:42 +05:30
Satyam-Rastogi d01e699250 access control by role plus by person in orgsettings 2026-05-14 18:13:42 +05:30
Satyam Rastogi 45301dbabd org level commission distribution for each member 2026-05-14 13:24:16 +05:30
Satyam-Rastogi 69d81c78d0 org level commission distribution for each member 2026-05-14 13:24:16 +05:30
Satyam Rastogi 42a1306aca door knock and referral attribution 2026-05-14 12:15:46 +05:30
Satyam-Rastogi 5aff14323c door knock and referral attribution 2026-05-14 12:15:46 +05:30
Satyam Rastogi 2299cda11d org team management section in org Settings module 2026-05-13 18:55:09 +05:30
Satyam-Rastogi b6a7792bf7 org team management section in org Settings module 2026-05-13 18:55:09 +05:30
Satyam Rastogi 315191c01b allow admin to access orgSetting page 2026-05-13 17:47:48 +05:30
Satyam-Rastogi 72d541cab2 allow admin to access orgSetting page 2026-05-13 17:47:48 +05:30
Satyam Rastogi 8f4a0e81fb commission overrides in org Settings page 2026-05-13 12:51:36 +05:30
Satyam-Rastogi 9bc8a42354 commission overrides in org Settings page 2026-05-13 12:51:36 +05:30
Satyam Rastogi 455462ded4 adds access modifiers for each role 2026-05-12 21:08:19 +05:30
Satyam-Rastogi 7598f8982a adds access modifiers for each role 2026-05-12 21:08:19 +05:30
Satyam Rastogi fea4ad2d22 Org settings module and user roles 2026-05-12 20:36:44 +05:30
Satyam-Rastogi e85ecd2571 Org settings module and user roles 2026-05-12 20:36:44 +05:30
Satyam Rastogi 3b1a77f500 team management feature in Owners Box 2026-05-12 19:29:52 +05:30
Satyam-Rastogi 17c3dc7307 team management feature in Owners Box 2026-05-12 19:29:52 +05:30
Satyam Rastogi 6ab3f4c2d4 configurable commission setting 2026-05-12 15:54:01 +05:30
Satyam-Rastogi c82cadd547 configurable commission setting 2026-05-12 15:54:01 +05:30
Satyam-Rastogi c584d918ac fix(kanban): responsive layout, drag-drop offset, and project view enhancements
Kanban pipeline board:
- Fix h-full flex-col layout so board fills viewport height on all screen sizes
- KanbanColumn drop zone: flex-1 min-h-0 so it expands to fill full column height
- KanbanCard: extract KanbanCardDisplay as named export for DragOverlay rendering above overflow containers
- KanbanPage: lift DndContext to page root; add "Add Stage" shortcut to page header
- PageTransition: remove slide-in-from-bottom-4 transform — the CSS transform ancestor was creating a containing block for position:fixed DragOverlay, causing drag ghost to render at a viewport offset
- Migrate fireCampaignToast to toast.custom() Sonner v2 API with explicit card styling

Project & lead views:
- LeadProjectPage: enrich project detail with richer info sections aligned with project stage
- OwnerProjectDetail: expand construction project detail with additional data panels
- OwnerProjectList: project list view improvements
- mockStore: extend lead/project data to support richer project detail rendering
2026-04-08 23:40:45 +05:30
Satyam-Rastogi b1ece35ac8 feat(kanban): Project Pipeline board with drag-and-drop, lead drawer, and full project view
- 44 mock leads across 7 stage columns + 2 bucket columns (Stuck, Follow-up) with seeded activity logs
- dnd-kit drag-and-drop: cross-column card movement, bucket logic, DragOverlay preview
- Campaign toast on stage drop: 20s countdown, Edit button opens message editor, auto-sends if ignored
- KanbanColumn: droppable zones, stage progress bar (position/total), column color accents, Add/Rename/Delete (Admin+Owner)
- KanbanCard: initials avatar, job type pill, insurance badge, assigned agent, days-in-stage counter, left color accent bar
- ColumnManagerModal: add/rename/delete stages with name, color picker, campaign message; delete blocked if leads exist
- LeadInfoDrawer: right slide-in with progress bar + stage steps, Details and Activity tabs, More Details CTA
- ActivityTimeline: color-coded entries (created/forward/regression/bucket), stage arrows, notes, agent + date
- LeadProjectPage: full project view at /*/leads/:leadId — progress bar, stage mover dropdown, info panels, full activity log, stats
- Routes: /*/kanban + /*/leads/:leadId for Owner, Admin, Field Agent
- Pipeline nav item added for all three roles
2026-04-08 19:56:42 +05:30