feat(routes): unify won leads and projects on a single /projects/:id page

- add role-prefix-free /projects/:id route (OWNER/ADMIN/FIELD_AGENT; ABAC guard lands in Phase 8)
- relax detail lookup so admin/field-agent open any project, owners only their own
- kanban drawer + project list route won leads (with projectId) to /projects/:id; pre-sale leads stay on the lead page
This commit is contained in:
Satyam Rastogi
2026-05-29 15:51:09 +05:30
parent d5ea0935b4
commit ec1d9dfb25
4 changed files with 15 additions and 6 deletions
+6
View File
@@ -188,6 +188,12 @@ function App() {
<OwnerProjectDetail />
</ProtectedRoute>
} />
{/* Unified project detail — won leads and projects share this page (interim coarse guard; ABAC policy guard lands in Phase 8) */}
<Route path="/projects/:projectId" element={
<ProtectedRoute allowedRoles={['OWNER', 'ADMIN', 'FIELD_AGENT']}>
<OwnerProjectDetail />
</ProtectedRoute>
} />
<Route path="/owner/maps" element={
<ProtectedRoute allowedRoles={['OWNER']}>
<Maps />