You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The opportunity creation form at /dashboard/opportunities/new exists but is broken in two ways:
Contact fields (name, email, phone) never pre-populate because GET /agent/me does not exist on the BE yet (feat: include agentId in GET /user/me response be#684). The useGetCurrentAgent() hook always returns undefined.
The form submission crashes — POST /api/opportunity/ does not exist on the BE. The only opportunity creation route is the public legacy form. A dashboard-specific endpoint needs to be added on the BE side.
Sub-issue of #675.
Context
The opportunity creation form at /dashboard/opportunities/new exists but is broken in two ways:
Contact fields (name, email, phone) never pre-populate because GET /agent/me does not exist on the BE yet (feat: include agentId in GET /user/me response be#684). The useGetCurrentAgent() hook always returns undefined.
The form submission crashes — POST /api/opportunity/ does not exist on the BE. The only opportunity creation route is the public legacy form. A dashboard-specific endpoint needs to be added on the BE side.
Blocked on
Fix
Pre-fill (src/components/Dashboard/NewOpportunity/NewOpportunity.tsx):
Submit crash:
After successful submit: