✨ dynamic collaborator price
This commit is contained in:
parent
d4c42472cf
commit
eec89e13b0
@ -1,5 +1,5 @@
|
|||||||
import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography";
|
import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography";
|
||||||
import { EForfeitType, forfeitsPrices } from "../../SubscriptionFacturation";
|
import { EForfeitType, collaboratorPrice, forfeitsPrices } from "../../SubscriptionFacturation";
|
||||||
import classes from "./classes.module.scss";
|
import classes from "./classes.module.scss";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import RadioBox from "@Front/Components/DesignSystem/RadioBox";
|
import RadioBox from "@Front/Components/DesignSystem/RadioBox";
|
||||||
@ -9,8 +9,6 @@ import { EType } from "le-coffre-resources/dist/Admin/Subscription";
|
|||||||
import Stripe from "@Front/Api/LeCoffreApi/Admin/Stripe/Stripe";
|
import Stripe from "@Front/Api/LeCoffreApi/Admin/Stripe/Stripe";
|
||||||
import { useRouter } from "next/router";
|
import { useRouter } from "next/router";
|
||||||
|
|
||||||
export const collaboratorPrice = 6.99;
|
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
forfeitType: EForfeitType;
|
forfeitType: EForfeitType;
|
||||||
numberOfCollaborators: number;
|
numberOfCollaborators: number;
|
||||||
|
@ -3,8 +3,8 @@ import classes from "./classes.module.scss";
|
|||||||
import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate";
|
import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate";
|
||||||
import NavTab from "@Front/Components/Elements/NavTab";
|
import NavTab from "@Front/Components/Elements/NavTab";
|
||||||
import NumberPicker from "@Front/Components/Elements/NumberPicker";
|
import NumberPicker from "@Front/Components/Elements/NumberPicker";
|
||||||
import SubscribeCheckoutTicket, { EPaymentFrequency, collaboratorPrice } from "../SubscribeCheckoutTicket";
|
import SubscribeCheckoutTicket, { EPaymentFrequency } from "../SubscribeCheckoutTicket";
|
||||||
import { EForfeitType, forfeitsPrices } from "../../SubscriptionFacturation";
|
import { EForfeitType, collaboratorPrice, forfeitsPrices } from "../../SubscriptionFacturation";
|
||||||
import { useEffect, useState } from "react";
|
import { useEffect, useState } from "react";
|
||||||
import Check from "@Front/Components/Elements/Icons/Check";
|
import Check from "@Front/Components/Elements/Icons/Check";
|
||||||
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
import Button, { EButtonVariant } from "@Front/Components/DesignSystem/Button";
|
||||||
|
@ -18,6 +18,7 @@ export enum EForfeitType {
|
|||||||
"standard",
|
"standard",
|
||||||
"unlimited",
|
"unlimited",
|
||||||
}
|
}
|
||||||
|
export const collaboratorPrice = 6.99;
|
||||||
|
|
||||||
export const forfeitsPrices: Record<EForfeitType, number> = {
|
export const forfeitsPrices: Record<EForfeitType, number> = {
|
||||||
[EForfeitType.standard]: 99,
|
[EForfeitType.standard]: 99,
|
||||||
@ -121,14 +122,14 @@ export default function SubscriptionFacturation() {
|
|||||||
<div className={classes["separator"]} />
|
<div className={classes["separator"]} />
|
||||||
<div className={classes["price-container"]}>
|
<div className={classes["price-container"]}>
|
||||||
<Typography typo={ITypo.H1} color={ITypoColor.BLACK}>
|
<Typography typo={ITypo.H1} color={ITypoColor.BLACK}>
|
||||||
99€
|
{forfeitsPrices[EForfeitType.standard]}€
|
||||||
<Typography typo={ITypo.H2} color={ITypoColor.BLACK}>
|
<Typography typo={ITypo.H2} color={ITypoColor.BLACK}>
|
||||||
HT
|
HT
|
||||||
</Typography>
|
</Typography>
|
||||||
/ mois
|
/ mois
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography typo={ITypo.P_18} color={ITypoColor.BLACK}>
|
<Typography typo={ITypo.P_18} color={ITypoColor.BLACK}>
|
||||||
+ 6,99€ / collaborateur / mois
|
+ {collaboratorPrice}€ / collaborateur / mois
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["button-container"]}>
|
<div className={classes["button-container"]}>
|
||||||
@ -185,7 +186,7 @@ export default function SubscriptionFacturation() {
|
|||||||
<div className={classes["separator"]} />
|
<div className={classes["separator"]} />
|
||||||
<div className={classes["price-container"]}>
|
<div className={classes["price-container"]}>
|
||||||
<Typography typo={ITypo.H1} color={ITypoColor.BLACK}>
|
<Typography typo={ITypo.H1} color={ITypoColor.BLACK}>
|
||||||
{/* forfeitsPrices[EForfeitType.unlimited].toString() */}€
|
{forfeitsPrices[EForfeitType.unlimited]}€
|
||||||
<Typography typo={ITypo.H2} color={ITypoColor.BLACK}>
|
<Typography typo={ITypo.H2} color={ITypoColor.BLACK}>
|
||||||
HT
|
HT
|
||||||
</Typography>
|
</Typography>
|
||||||
|
@ -5,7 +5,7 @@ import Image from "next/image";
|
|||||||
import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate";
|
import DefaultTemplate from "@Front/Components/LayoutTemplates/DefaultTemplate";
|
||||||
import Button from "@Front/Components/DesignSystem/Button";
|
import Button from "@Front/Components/DesignSystem/Button";
|
||||||
import Link from "next/link";
|
import Link from "next/link";
|
||||||
import { EForfeitType, forfeitsPrices } from "../SubscriptionFacturation";
|
import { EForfeitType, collaboratorPrice, forfeitsPrices } from "../SubscriptionFacturation";
|
||||||
|
|
||||||
export default function SubscriptionNew() {
|
export default function SubscriptionNew() {
|
||||||
return (
|
return (
|
||||||
@ -43,7 +43,7 @@ export default function SubscriptionNew() {
|
|||||||
/ mois
|
/ mois
|
||||||
</Typography>
|
</Typography>
|
||||||
<Typography typo={ITypo.P_18} color={ITypoColor.BLACK}>
|
<Typography typo={ITypo.P_18} color={ITypoColor.BLACK}>
|
||||||
+ 6,99€ / collaborateur / mois
|
+ {collaboratorPrice}€ / collaborateur / mois
|
||||||
</Typography>
|
</Typography>
|
||||||
</div>
|
</div>
|
||||||
<div className={classes["button-container"]}>
|
<div className={classes["button-container"]}>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user