-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Add EnrolledPartnerSchemaExtended for individual partner pages #2897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
WalkthroughReplaces EnrolledPartnerSchema with EnrolledPartnerSchemaExtended across API, types, SWR hook, and UI; backend query now returns aggregated lastLeadAt and lastConversionAt timestamps which are validated and surfaced to UI components (PartnerInfoCards, OnlinePresenceSummary, PartnerAbout). Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant UI as Partner UI
participant SWR as usePartner (SWR)
participant API as /api/partners/[partnerId]
participant DB as get-partner-for-program
User->>UI: open partner page
UI->>SWR: fetch partner (partnerId, workspaceId)
SWR->>API: GET /api/partners/[partnerId]
API->>DB: query partner + metrics (includes MAX(lastLeadAt,lastConversionAt))
DB-->>API: row with lastLeadAt, lastConversionAt
API->>API: validate with EnrolledPartnerSchemaExtended
API-->>SWR: JSON (extended shape)
SWR-->>UI: deliver extended partner data
UI->>UI: render partner details (show lastLeadAt / lastConversionAt when approved)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
💤 Files with no reviewable changes (1)
🧰 Additional context used🧬 Code graph analysis (2)apps/web/ui/partners/partner-about.tsx (1)
apps/web/ui/partners/online-presence-summary.tsx (1)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Chores