Skip to content
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

feat(fee-breakdown): Display for "invite to pay" journeys #4057

Merged
merged 7 commits into from
Dec 10, 2024

Conversation

DafyddLlyr
Copy link
Contributor

@DafyddLlyr DafyddLlyr commented Dec 9, 2024

What does this PR do?

  • Calculates and stores a fee breakdown when a payment request is generated
  • Fetches and displays this on the front end when a payment request is paid for

✅ Regression tests passing here https://github.com/theopensystemslab/planx-new/actions/runs/12238473625

Copy link

github-actions bot commented Dec 9, 2024

🤖 Hasura Change Summary compared a subset of table metadata including permissions:

Updated Tables (1)

  • public.payment_requests permissions:

    insert select update delete
    api / / /
    public /
    4 added column permissions
    insert select update
    api ➕ fee_breakdown ➕ fee_breakdown ➕ fee_breakdown
    public

Copy link

github-actions bot commented Dec 9, 2024

Removed vultr server and associated DNS entries

@DafyddLlyr DafyddLlyr requested a review from a team December 9, 2024 15:27
@DafyddLlyr DafyddLlyr marked this pull request as ready for review December 9, 2024 15:27
hideFeeBanner={true}
paymentStatus={payment?.state.status}
/>
</>
Copy link
Member

Choose a reason for hiding this comment

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

nit: I think this should be feature-flagged ? I can see a breakdown here with & without feature flag: https://4057.planx.pizza/barnet/invite-to-pay-test/pay?paymentRequestId=f0babfb3-4a57-4c01-bdc2-cd344bac865c

Also, minor style nitpick: should we remove "Fee" line from top table, and then simply call bottom part "Fee" instead of "Fee breakdown" ?
Screenshot from 2024-12-09 16-46-37

Copy link
Member

Choose a reason for hiding this comment

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

Also, do we need to account for any active invitations that won't have saved breakdown details when this merges? Will the breakdown simply not display/be hidden?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yep - feature flag should be here thanks!

Changed from "Fee breakdown" to "Fee".

This will just not show at all if there's no fee breakdown, so we should be ok for that transition period 👍

I'd love a pass over this page by Ian at some point also - the two tables, one horizontal and one vertical just feel a bit weird back to back here.

@@ -0,0 +1,2 @@
alter table "public"."payment_requests" add column "fee_breakdown" jsonb
null;
Copy link
Member

Choose a reason for hiding this comment

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

👍

@DafyddLlyr DafyddLlyr merged commit 28f1e10 into main Dec 10, 2024
12 checks passed
@DafyddLlyr DafyddLlyr deleted the dp/fee-breakdown-itp branch December 10, 2024 10:56
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.

2 participants