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: Cascade parent plan changes #1818

Merged
merged 6 commits into from
Nov 13, 2024
Merged

Conversation

stephenlago99
Copy link
Collaborator

Context

This PR implements a new modal that is shown when trying to edit a plan that has some overrides (subscriptions that have different values for the plan).

The changes were done based on the frontend dive-in: [FE] [Dive-in] Cascade parent plan changes to child plan.

Description

👉 Implemented a new dialog - ImpactOverridenSubscriptionsDialog

The dialog has it's own Formik form in order to keep values separated (the user could have updated the values, then closed the modal which would have left that value in a floating state). This pattern can also be seen in the existing CreateWebhookDialog component.

👉 When saving a plan, check for plan.hasOverriddenPlans

If it is true, we show the new modal, and when the user presses Save in the new modal, we populate the value in formik and we send it to the updatePlan mutation.

Implements LAGO-457

@stephenlago99 stephenlago99 self-assigned this Oct 22, 2024
@stephenlago99 stephenlago99 force-pushed the feat-cascade-parent-plan-changes branch 2 times, most recently from ae782a8 to 8e96d8e Compare October 23, 2024 08:09
@ansmonjol ansmonjol force-pushed the feat-cascade-parent-plan-changes branch from 3398a27 to d92cf56 Compare October 31, 2024 09:01
@stephenlago99 stephenlago99 force-pushed the feat-cascade-parent-plan-changes branch 3 times, most recently from cb01372 to 5a78252 Compare November 6, 2024 10:37
@ansmonjol ansmonjol force-pushed the feat-cascade-parent-plan-changes branch from 5a78252 to 524367b Compare November 12, 2024 08:25
@ansmonjol ansmonjol force-pushed the feat-cascade-parent-plan-changes branch from 524367b to a5af714 Compare November 13, 2024 11:01
@ansmonjol ansmonjol enabled auto-merge (squash) November 13, 2024 11:06
@ansmonjol ansmonjol merged commit c5e5fb1 into main Nov 13, 2024
6 checks passed
@ansmonjol ansmonjol deleted the feat-cascade-parent-plan-changes branch November 13, 2024 11:10
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