Feature branch : dcc2 adaptation (do NOT merge) - #275
Draft
CamilleFljt wants to merge 4 commits into
Draft
Conversation
* feat(dcc2): add regulatory figure getters Centralize the plan-amount/rate math (total purchase amount, initial deposit, financed amount, credit duration, TAEG) that DCC2 disclosure needs, instead of recomputing it inline per component. * feat(dcc2): add legal-disclosure predicates isDeferred, isPayLater, isPNX and requiresLegalDisclosure are the single source of truth for which plans need DCC2 disclosure and which legal-mentions template applies (standard vs. Pay Later), so every consumer branches on the same predicate instead of re-deriving it. * refactor(dcc2): use regulatoryFigures in TotalBlock Replace TotalBlock's inline TAEG/total/deposit/duration math with calls to the new regulatoryFigures module. No behavioral change, variable names and translations untouched. * refactor(dcc2): rename TotalBlock variables and message placeholders Rename TAEG/firstInstallmentAmount/totalWithoutFirstInstallment/ durationInMonths to annualPercentageRate/initialDeposit/ financedAmount/creditDurationInMonths, and extract purchaseAmount (total - creditCost) as its own value, to match the regulatoryFigures naming introduced in the previous commit. Translations re-synced via npm run translations:extract, which also drops two accessibility keys no longer referenced anywhere in source. * refactor(dcc2): remove redundant customerFees variable in TotalBlock Co-Authored-By: Claude <noreply@anthropic.com> * refactor(dcc2): reuse regulatoryFigures predicates in EligibilityModal and paymentPlanStrings Co-Authored-By: Claude <noreply@anthropic.com> * refactor(utils): reuse isP1X in filterEligibility and paymentPlanStrings Co-Authored-By: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
* feat(dcc2): complete eligibility fixtures * feat(dcc2): clean code
* refactor(types): structure EligibilityPlan as discriminated union matching backend contract * feat(regulatoryFigures): add isCredit predicate for plans with >4 installments * feat(regulatoryFigures): add getCustomerFees to expose the customer fee amount * feat(installments): add LegalMentions component for credit/PNX/PayLater disclosure text * feat: add translations
* feat: create legal mentions component (#277) * refactor(types): structure EligibilityPlan as discriminated union matching backend contract * feat(regulatoryFigures): add isCredit predicate for plans with >4 installments * feat(regulatoryFigures): add getCustomerFees to expose the customer fee amount * feat(installments): add LegalMentions component for credit/PNX/PayLater disclosure text * feat: add translations * feat(dcc2): add WarningMessage component * fixup! feat(dcc2): add WarningMessage component Use the existing --font-x-small (12px) and --dark-gray tokens for the warning sentence instead of introducing --font-warning, which is removed again. --dark-gray is the value main.css flags as the one recommended for contrast. * feat(dcc2): clean code --------- Co-authored-by: Gregoire OLIVIER <35299257+greg-olivier@users.noreply.github.com> (cherry picked from commit 4e5e725)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Feature branch for DCC2 adaptation feature regrouping every ticket from the project