feat: allow to create custom pricing #2275
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Context
We're introducing Custom pricing in the app. So customers can define their pricing without relying directly on a Fiat currency but on a ratio between a Fiat currency and a Pricing Unit.
Later this will impact all objects from plan to invoice including current usage.
Description
This PR is the first step of introducing this Pricing Unit feature in the app.
We have a new section in invoice settings that allows to create a new Pricing Unit.
This section is hidden behind a FE feature flag for now, until next parts are developed and QA is approved.
I took the opportunity to add the
fetchMore
logic on the existing custom section present in the invoice settings page.We should not expect that much object to be created in those 2 sections but we never know. Better be handled.
So they both now have infinite scroll refetch and pagination in Apollo cache.
Tried to split in 2 commits but the diff is not prefect.
Fixes LAGO-879