Skip to content

feat: agent can publish an opportunity within the app #445

@nadavosa

Description

@nadavosa

Sub-issue of #675.

Context

The opportunity creation form at /dashboard/opportunities/new exists but is broken in two ways:

  1. 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.

  2. 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:

  • Reproduce as an NGO user: open the page, fill the form, submit, check the network tab
  • Identify the exact failing endpoint
  • BE issue 236 for the missing POST /opportunity/ dashboard route
  • Once the BE endpoint exists, wire it up and verify end-to-end

After successful submit:

  • Verify redirect to the new opportunity profile page works
  • Verify the NGO can see and edit their opportunity at /dashboard/opportunities/:id

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

Status
Done

Relationships

None yet

Development

No branches or pull requests

Issue actions