fix: wire all agency components to real API endpoints#19
Merged
Conversation
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>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetch()calls against existing/api/v1/...endpointsdeal.platformbadge/filter everywhere (field does not exist in Prisma schema)BriefDetailto showbrandManagerClerkIdinstead of mock-onlybrandManagerName/brandManagerCompanyMockCreatorfixture withupdatedAtso it satisfiesApiCreator[]in testsComponents wired
InlineBrandFormPOST /api/v1/brandsDealNewFormPOST /api/v1/dealsAddCreatorSheetPOST /api/v1/rosterKanbanBoardPOST /api/v1/deals/[id]/stage(optimistic + rollback)StageControlPanelPOST /api/v1/deals/[id]/stage+POST /api/v1/deals/[id]/reopenDealDetailPATCH /api/v1/deals/[id],POST/PATCH /api/v1/deals/[id]/submissions/[sid]BriefDetailPATCH /api/v1/briefs/[id]Quality gates
npm run typecheck— 0 errorsnpm run lint— 0 new errorsnpm run test— 118/118 passnpm run build— 41 routes compiled successfullyTest plan
/deals/new— verify redirect to deal detail page🤖 Generated with Claude Code