Skip to content

added buyer referral view on fundraiser page - #206

Merged
8ddieHu0314 merged 1 commit into
mainfrom
eddie/add-referral-mvp
Nov 23, 2026
Merged

8ddieHu0314 merged 1 commit into
mainfrom
eddie/add-referral-mvp

Conversation

@8ddieHu0314

@8ddieHu0314 8ddieHu0314 commented Nov 23, 2026 •

Copy link
Copy Markdown
Member

Changes

  • common: getReferralQuantities(orders), the seller referrals table's calculation moved here so the table and the new count share it. New ReferralCountSchema ({ orderCount }).
  • backend: new GET /fundraiser/:id/referrals/me, which returns only the logged-in user's own count (401 logged out, 404 not a referrer, 403 pending). Tests added.
  • frontend: the buyer fundraiser page fetches the count on the server for approved referrers, and the referral card shows "You've referred N confirmed orders". The seller referrals table now calls the shared function.
  • Small extras: the question-mark tooltip opens after 0.1s instead of 0.7s (all 6 places), and a stray … is removed from its class list.

How to test

Needs a published, open fundraiser in an org where you are an admin.

  1. cd common && pnpm build, then start both dev servers.
  2. Open the fundraiser's buyer page logged in: Sign Up button, no count. Sign up and reload: still no count (pending).
  3. Approve yourself under Manage Referrals on the seller page. Reload the buyer page: "You've referred 0 confirmed orders".
  4. Order through your referral link, then confirm the payment on the seller page. Reload: "1 confirmed order", and your row in the seller Referrals table also shows 1.
  5. Logged out (private window): no referral card.
  6. cd backend && pnpm test.

Screenshots

Referral.Count.Demo.mp4

Checklist

  • Targets main
  • Runs locally with pnpm assemble and both dev servers
  • If schema.prisma changed: migration file is included and existing rows are backfilled (no schema change)
  • If common/ changed: pnpm build in common and both consumers updated
  • No .env* files, keys, or real user data in the diff or screenshots
  • I read every line of this diff and can explain it in review

@vercel

vercel Bot commented Nov 23, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated
curaise Ready Ready Preview Nov 23, 2026 6:23am UTC

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: QUIET
  • Plan: Advanced
  • Run ID: fe1492a7-a157-44aa-ab12-ae1da6c0e1eb

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review

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.

Share

@8ddieHu0314
8ddieHu0314 merged commit f0b39a8 into main Nov 23, 2026
5 checks passed

This branch was successfully deployed

1 active deployment
Preview — 0b2c7358 Deployed Nov 23, 2026 by vercel[bot]
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