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:
@@ -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"
|
||||
>
|
||||
|
||||
Reference in New Issue
Block a user