feat(estimates): add EstimatesPage hub with templates tab, estimate detail drawer, and template editor
- EstimatesPage: tabbed hub with Estimates and Templates tabs, KPI strip, search + filter - EstimateDetailModal: right-side drawer showing scope of work, computed line items, and financial summary from template + roof area - TemplateEditorModal: create/edit/duplicate templates with segmented mode toggle - Owner-only template management (create, edit, duplicate, delete); Admin/FA read-only view - Duplicate mode: toggle between 'Save as new copy' (default, editable name) and 'Replace original' - MASTER_TEMPLATES and MOCK_ESTIMATES moved into mockStore with full CRUD helpers - TemplateSelectionModal now reads from mockStore instead of local stub - Sidebar nav updated to point to /estimates hub for all roles - Routes added: /emp/fa/estimates, /admin/estimates, /owner/estimates
This commit is contained in:
@@ -145,7 +145,7 @@ const Layout = () => {
|
||||
icon: LayoutDashboard,
|
||||
label: <span><span className="text-[#fda913]">Pro</span>Canvas</span>
|
||||
},
|
||||
{ to: "/owner/estimate", icon: Calculator, label: "Estimate Builder" },
|
||||
{ to: "/owner/estimates", icon: Calculator, label: "Estimates" },
|
||||
{ to: "/admin/schedule", icon: Calendar, label: "Team Schedule" },
|
||||
{ to: "/admin/leaderboard", icon: Trophy, label: "Leaderboard" },
|
||||
...commonItems,
|
||||
@@ -163,7 +163,7 @@ const Layout = () => {
|
||||
icon: LayoutDashboard,
|
||||
label: <span><span className="text-[#fda913]">Pro</span>Canvas</span>
|
||||
},
|
||||
{ to: "/admin/estimate", icon: Calculator, label: "Estimate Builder" },
|
||||
{ to: "/admin/estimates", icon: Calculator, label: "Estimates" },
|
||||
...commonItems,
|
||||
];
|
||||
case 'CONTRACTOR':
|
||||
@@ -189,7 +189,7 @@ const Layout = () => {
|
||||
icon: LayoutDashboard,
|
||||
label: <span><span className="text-[#fda913]">Pro</span>Canvas</span>
|
||||
},
|
||||
{ to: "/emp/fa/estimate", icon: Calculator, label: "Estimate Builder" },
|
||||
{ to: "/emp/fa/estimates", icon: Calculator, label: "Estimates" },
|
||||
...commonItems,
|
||||
];
|
||||
default: // Customer or Fallback
|
||||
|
||||
Reference in New Issue
Block a user