Skip to content

feat(next): allow location change on active sub#18745

Merged
StaberindeZA merged 1 commit intomainfrom
fxa-11508-allow-active-loc-change
May 1, 2025
Merged

feat(next): allow location change on active sub#18745
StaberindeZA merged 1 commit intomainfrom
fxa-11508-allow-active-loc-change

Conversation

@StaberindeZA
Copy link
Copy Markdown
Contributor

@StaberindeZA StaberindeZA commented Apr 21, 2025

Because

  • Allow customers with active subscriptions to change tax location as long as currency isnt altered.
  • Display message informing customers that a change in tax location could impact all existing subscriptions.

This pull request

  • Add new method to TaxService to check if a tax location change is allowed.
  • Consolidate location validity checks into ValidateLocationAction
  • Update Location and New pages, as well as SelectTaxLocation saveAction methods to use ValidateLocationAction
  • Adds message to SelectTaxLocation and is only shown when a customer has an active subscription.
  • For carts with state Start, add new field indicating whether or not an active subscription exists

Issue that this pull request solves

Closes: #FXA-11508

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

New customer without active subscription
image

Existing customer with active subscription
image

@StaberindeZA StaberindeZA force-pushed the fxa-11508-allow-active-loc-change branch 2 times, most recently from 1b39c55 to 615aed2 Compare April 28, 2025 23:06
@StaberindeZA StaberindeZA marked this pull request as ready for review April 28, 2025 23:06
@StaberindeZA StaberindeZA requested review from a team as code owners April 28, 2025 23:06
@StaberindeZA StaberindeZA force-pushed the fxa-11508-allow-active-loc-change branch from 615aed2 to e3c3bf8 Compare April 29, 2025 21:41
Comment thread apps/payments/next/next.config.js
Comment thread libs/payments/cart/src/lib/tax.service.ts
Because:

- Allow customers with active subscriptions to change tax location as
  long as currency isnt altered.
- Display message informing customers that a change in tax location
  could impact all existing subscriptions.

This commit:

- Add new method to TaxService to check if a tax location change is
  allowed.
- Consolidate location validity checks into ValidateLocationAction
- Update Location and New pages, as well as SelectTaxLocation saveAction
  methods to use ValidateLocationAction
- Adds message to SelectTaxLocation and is only shown when a customer
  has an active subscription.
- For carts with state Start, add new field indicating whether or not an
  active subscription exists

Closes #FXA-11508
@StaberindeZA StaberindeZA force-pushed the fxa-11508-allow-active-loc-change branch from e3c3bf8 to db4e9f3 Compare April 30, 2025 19:23
@StaberindeZA StaberindeZA requested a review from julianpoy April 30, 2025 19:23
@StaberindeZA StaberindeZA merged commit f4069c0 into main May 1, 2025
20 checks passed
@StaberindeZA StaberindeZA deleted the fxa-11508-allow-active-loc-change branch May 1, 2025 13:22
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