Skip to content

fix: wire all agency components to real API endpoints#19

Merged
parva3105 merged 1 commit intomasterfrom
fix/agency-api-wiring
Mar 22, 2026
Merged

fix: wire all agency components to real API endpoints#19
parva3105 merged 1 commit intomasterfrom
fix/agency-api-wiring

Conversation

@parva3105
Copy link
Copy Markdown
Owner

Summary

  • Replaces mock handlers in 11 components with real fetch() calls against existing /api/v1/... endpoints
  • Removes deal.platform badge/filter everywhere (field does not exist in Prisma schema)
  • Fixes BriefDetail to show brandManagerClerkId instead of mock-only brandManagerName/brandManagerCompany
  • Updates MockCreator fixture with updatedAt so it satisfies ApiCreator[] in tests

Components wired

Component Endpoint
InlineBrandForm POST /api/v1/brands
DealNewForm POST /api/v1/deals
AddCreatorSheet POST /api/v1/roster
KanbanBoard POST /api/v1/deals/[id]/stage (optimistic + rollback)
StageControlPanel POST /api/v1/deals/[id]/stage + POST /api/v1/deals/[id]/reopen
DealDetail PATCH /api/v1/deals/[id], POST/PATCH /api/v1/deals/[id]/submissions/[sid]
BriefDetail PATCH /api/v1/briefs/[id]

Quality gates

  • npm run typecheck — 0 errors
  • npm run lint — 0 new errors
  • npm run test — 118/118 pass
  • npm run build — 41 routes compiled successfully

Test plan

  • Create a new deal from /deals/new — verify redirect to deal detail page
  • Add a brand inline — verify brand appears in dropdown
  • Add a creator from roster — verify row appears in table
  • Drag a deal card between Kanban columns — verify stage updates, reverts on failure
  • Advance/reopen deal stage via StageControlPanel
  • Submit content URL in DealDetail, approve/request changes
  • Mark brief as reviewed and declined in BriefDetail

🤖 Generated with Claude Code

Replaces every mock handler in the agency-facing components with real
fetch() calls against /api/v1/... endpoints. Removes deal.platform
badge and filter (field not in Prisma schema). Fixes BriefDetail to
show brandManagerClerkId instead of mock-only name/company fields.
Adds updatedAt to MockCreator fixture so tests satisfy ApiCreator[].

- typecheck: 0 errors
- lint: 0 new errors
- test: 118/118 pass
- build: 41 routes compiled successfully

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
project-alpha Ready Ready Preview, Comment Mar 22, 2026 6:36am

@parva3105 parva3105 merged commit a4f5367 into master Mar 22, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant