Skip to content

Feature/65 discount modal#73

Merged
RenaudBernier merged 19 commits into
developfrom
feature/65-discount-modal
May 26, 2026
Merged

Feature/65 discount modal#73
RenaudBernier merged 19 commits into
developfrom
feature/65-discount-modal

Conversation

@Jxl-s
Copy link
Copy Markdown
Contributor

@Jxl-s Jxl-s commented May 21, 2026

Closes #65

Overview

Adds the discount modal

Testing

Manually open and create/delete discounts to see it works

Screenshots / Screencasts

image

Checklist

  • Code is neat, readable, and works
  • Code is commented where appropriate and well-documented
  • Commit messages follow our guidelines
  • Issue number is linked
  • Branch is linked
  • Reviewers are assigned (one of your tech leads)

Tip: You can make the issue and then check them after the fact or replace [ ] with [x] to check it!

Notes

I've added the font from the Figma file for now, to use within this component, though later on we should change how it's used in this component

Copy link
Copy Markdown
Member

@RenaudBernier RenaudBernier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The modal should show the original price of the selected service

Copy link
Copy Markdown
Member

@RenaudBernier RenaudBernier left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice work jia

Copy link
Copy Markdown
Contributor

@martin0024 martin0024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good job jia! thanks

Comment thread components/discount-modal.tsx Outdated
Comment thread components/discount-modal.tsx Outdated
Comment thread components/discount-modal.tsx Outdated
Comment thread components/discount-modal.tsx Outdated
Comment thread components/discount-modal.tsx Outdated
Comment thread components/discount-modal.tsx Outdated
Comment thread app/(authenticated)/discounts/actions.ts Outdated
Comment thread app/(authenticated)/users/_components/user-actions-cell.tsx
services={services}
loading={loading}
open={open}
onOpenChange={handleOpenChange}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

re-hits Stripe on every open no caching?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap listStripeServices in unstable_cache since service catalogs change rarely, right now on modal open it does 2 stripe api calls products +prices.

Copy link
Copy Markdown
Contributor

@martin0024 martin0024 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

requested changed, see comments above

Comment thread components/discount-modal.tsx Outdated
onOpenChange?: (open: boolean) => void;
}

const TABLE_GRID = "grid grid-cols-[2fr_1fr_1fr_1fr_2.5rem]";
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Raw HTML instead of components/ui/table.tsx. Table Docs

services={services}
loading={loading}
open={open}
onOpenChange={handleOpenChange}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrap listStripeServices in unstable_cache since service catalogs change rarely, right now on modal open it does 2 stripe api calls products +prices.

@RenaudBernier RenaudBernier merged commit 0f3c7aa into develop May 26, 2026
1 check 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.

3 participants