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
+3 -1
View File
@@ -299,7 +299,9 @@ export default function LeadInfoDrawer({ lead, columns, isOpen, onClose }) {
<button
onClick={() => {
onClose();
navigate(`${basePath}/leads/${lead.id}`);
// Won leads are projects now — open the unified project page; pre-sale leads stay on the lead page.
if (lead.projectId) navigate(`/projects/${lead.projectId}`);
else navigate(`${basePath}/leads/${lead.id}`);
}}
className="w-full flex items-center justify-center gap-2 px-4 py-2.5 rounded-xl bg-blue-600 hover:bg-blue-700 text-white text-sm font-semibold transition-colors shadow-sm"
>