feat: Multi-role platform expansion, mobile nav redesign, and UI polish

- Add Owner, Contractor, Vendor, Subcontractor dashboards and role-based routing
- Owner now has superuser access to all Admin pages (dashboard, schedule, leaderboard)
- Redesign landing page mobile menu as slide-in sidebar (replaces broken Framer Motion overlay)
- Add body scroll lock to app sidebar for mobile consistency
- Fix Team Schedule to match Admin Dashboard design language (ambient glows, gradient header, SpotlightCard, zinc palette)
- Fix login page tab overflow — use abbreviated labels and grid layout for 6 role tabs
- Fix Recharts ResponsiveContainer warnings — replace height="100%" with fixed pixel heights
- Fix lightbox image viewer — unified nav bar, touch swipe support, no more overlapping text
- Add AI Assistant page, People/Vendor/Document management for Owner role
- Expand mock data store with contractor, vendor, and subcontractor data
This commit is contained in:
Satyam
2026-02-17 01:19:41 +05:30
parent 35cbdeb33c
commit 2eaac6b84a
44 changed files with 6857 additions and 662 deletions
+22
View File
@@ -103,6 +103,25 @@ const MapLegend = () => {
);
};
// Map Resizer Component
const MapResizer = () => {
const map = useMapEvents({});
useEffect(() => {
const resizeObserver = new ResizeObserver(() => {
map.invalidateSize();
});
const container = map.getContainer();
resizeObserver.observe(container);
return () => {
resizeObserver.disconnect();
};
}, [map]);
return null;
};
// Map View
const MapView = ({ data, onSelect, onMapCreate }) => {
const mapStart = [33.0708, -96.7455];
@@ -110,6 +129,9 @@ const MapView = ({ data, onSelect, onMapCreate }) => {
return (
<MapContainer center={mapStart} zoom={18} scrollWheelZoom={true} className="w-full h-full z-0 relative outline-none" style={{ height: "100%", width: "100%" }}>
<MapResizer />
{/*
- Light Mode: Standard vibrant OSM tiles (no filters)
- Dark Mode: Inverted, Grayscale, High Contrast for dark map