fix responsive price

This commit is contained in:
Maxime Lalo 2024-04-25 14:20:45 +02:00
parent 5a3f19e76f
commit 1127034cd8
3 changed files with 14 additions and 9 deletions

14
package-lock.json generated
View File

@ -1418,9 +1418,9 @@
"optional": true
},
"node_modules/bare-path": {
"version": "2.1.1",
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.1.tgz",
"integrity": "sha512-OHM+iwRDRMDBsSW7kl3dO62JyHdBKO3B25FB9vNQBPcGHMo4+eA8Yj41Lfbk3pS/seDY+siNge0LdRTulAau/A==",
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/bare-path/-/bare-path-2.1.2.tgz",
"integrity": "sha512-o7KSt4prEphWUHa3QUwCxUI00R86VdjiuxmJK0iNVDHYPGo+HsDaVCnqCmPbf/MiW1ok8F4p3m8RTHlWk8K2ig==",
"optional": true,
"dependencies": {
"bare-os": "^2.1.0"
@ -2061,13 +2061,13 @@
}
},
"node_modules/es-iterator-helpers": {
"version": "1.0.18",
"resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.18.tgz",
"integrity": "sha512-scxAJaewsahbqTYrGKJihhViaM6DDZDDoucfvzNbK0pOren1g/daDQ3IAhzn+1G14rBG7w+i5N+qul60++zlKA==",
"version": "1.0.19",
"resolved": "https://registry.npmjs.org/es-iterator-helpers/-/es-iterator-helpers-1.0.19.tgz",
"integrity": "sha512-zoMwbCcH5hwUkKJkT8kDIBZSz9I6mVG//+lDCinLCGov4+r7NIy0ld8o03M0cJxl2spVf6ESYVS6/gpIfq1FFw==",
"dependencies": {
"call-bind": "^1.0.7",
"define-properties": "^1.2.1",
"es-abstract": "^1.23.0",
"es-abstract": "^1.23.3",
"es-errors": "^1.3.0",
"es-set-tostringtag": "^2.0.3",
"function-bind": "^1.1.2",

View File

@ -48,6 +48,7 @@ export default function SubscribeIllimityComponent({ hasNavTab = true }: IProps)
} catch (error) {}
};
let multiplierToUse = paymentFrequency === EPaymentFrequency.yearly ? multiplier - 1 : multiplier;
return (
<>
<DefaultTemplate title="Nouvelle souscription" hasBackArrow>
@ -129,7 +130,7 @@ export default function SubscribeIllimityComponent({ hasNavTab = true }: IProps)
Total TTC
</Typography>
<Typography typo={ITypo.P_SB_18} color={ITypoColor.BLACK}>
{formatFloat(forfeitsPrices[EForfeitType.unlimited] * 1.2 * multiplier)}
{formatFloat(forfeitsPrices[EForfeitType.unlimited] * 1.2 * multiplierToUse)}
&nbsp;
</Typography>
</div>

View File

@ -39,6 +39,8 @@ export default function SubscribeStandardComponent({ hasNavTab = true }: IProps)
setPaymentFrequency(parseInt(e.target.value) as EPaymentFrequency);
};
let multiplierToUse = paymentFrequency === EPaymentFrequency.yearly ? multiplier - 1 : multiplier;
return (
<>
<DefaultTemplate title="Nouvelle souscription" hasBackArrow>
@ -120,7 +122,9 @@ export default function SubscribeStandardComponent({ hasNavTab = true }: IProps)
</Typography>
<Typography typo={ITypo.P_SB_18} color={ITypoColor.BLACK}>
{formatFloat(
(forfeitsPrices[EForfeitType.standard] + collaboratorPrice * numberOfCollaborators) * 1.2 * multiplier,
(forfeitsPrices[EForfeitType.standard] * multiplierToUse +
collaboratorPrice * numberOfCollaborators * multiplier) *
1.2,
)}
&nbsp;
</Typography>