✨ fixing warning and errors
This commit is contained in:
parent
04489344fd
commit
d4c42472cf
@ -72,7 +72,7 @@ export default function ClientDashboard(props: IProps) {
|
|||||||
setIsAddDocumentModalVisible(true);
|
setIsAddDocumentModalVisible(true);
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
async function downloadFile() {
|
const downloadFile = useCallback(async () => {
|
||||||
if (!folder?.office?.uid) return;
|
if (!folder?.office?.uid) return;
|
||||||
const blob = await OfficeRib.getInstance().getRibStream(folder.office.uid);
|
const blob = await OfficeRib.getInstance().getRibStream(folder.office.uid);
|
||||||
const ribUrl = URL.createObjectURL(blob);
|
const ribUrl = URL.createObjectURL(blob);
|
||||||
@ -84,7 +84,7 @@ export default function ClientDashboard(props: IProps) {
|
|||||||
a.download = "";
|
a.download = "";
|
||||||
document.body.appendChild(a);
|
document.body.appendChild(a);
|
||||||
a.click();
|
a.click();
|
||||||
}
|
}, [folder]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
getDocuments();
|
getDocuments();
|
||||||
@ -126,7 +126,15 @@ export default function ClientDashboard(props: IProps) {
|
|||||||
)}
|
)}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}, [customer, folder?.folder_number, folder?.name, folder?.office?.name]);
|
}, [
|
||||||
|
customer?.contact?.first_name,
|
||||||
|
customer?.contact?.last_name,
|
||||||
|
downloadFile,
|
||||||
|
folder?.folder_number,
|
||||||
|
folder?.name,
|
||||||
|
folder?.office?.name,
|
||||||
|
folder?.office?.rib_name,
|
||||||
|
]);
|
||||||
|
|
||||||
const renderBox = useCallback(() => {
|
const renderBox = useCallback(() => {
|
||||||
return (
|
return (
|
||||||
|
@ -76,7 +76,7 @@ export default function DeedTypesEdit() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
[deedTypeUid, router, validationError],
|
[deedTypeUid, router],
|
||||||
);
|
);
|
||||||
|
|
||||||
const onFieldChange = useCallback((name: string, field: any) => {
|
const onFieldChange = useCallback((name: string, field: any) => {
|
||||||
|
@ -41,10 +41,10 @@ export default function Login() {
|
|||||||
router.push("https://connexion.idnot.fr/");
|
router.push("https://connexion.idnot.fr/");
|
||||||
}, [router]);
|
}, [router]);
|
||||||
|
|
||||||
const closeContactAdminModal = useCallback(() => {
|
const closeContactAdminModal = () => {
|
||||||
setIsErrorModalOpen(0);
|
setIsErrorModalOpen(0);
|
||||||
window.open("https://www.lecoffre.io/contact", "_blank");
|
window.open("https://www.lecoffre.io/contact", "_blank");
|
||||||
}, [router]);
|
};
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
openErrorModal(parseInt(error as string));
|
openErrorModal(parseInt(error as string));
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography";
|
import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Typography";
|
||||||
import { EForfeitType } from "../../SubscriptionFacturation";
|
import { EForfeitType, 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,11 +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 forfeitsPrices: Record<EForfeitType, number> = {
|
|
||||||
[EForfeitType.standard]: 99,
|
|
||||||
[EForfeitType.unlimited]: 249,
|
|
||||||
};
|
|
||||||
|
|
||||||
export const collaboratorPrice = 6.99;
|
export const collaboratorPrice = 6.99;
|
||||||
|
|
||||||
type IProps = {
|
type IProps = {
|
||||||
|
@ -2,8 +2,8 @@ import Typography, { ITypo, ITypoColor } from "@Front/Components/DesignSystem/Ty
|
|||||||
import classes from "./classes.module.scss";
|
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 SubscribeCheckoutTicket, { EPaymentFrequency, forfeitsPrices } from "../SubscribeCheckoutTicket";
|
import SubscribeCheckoutTicket, { EPaymentFrequency } from "../SubscribeCheckoutTicket";
|
||||||
import { EForfeitType } from "../../SubscriptionFacturation";
|
import { EForfeitType, 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";
|
||||||
|
@ -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, forfeitsPrices } from "../SubscribeCheckoutTicket";
|
import SubscribeCheckoutTicket, { EPaymentFrequency, collaboratorPrice } from "../SubscribeCheckoutTicket";
|
||||||
import { EForfeitType } from "../../SubscriptionFacturation";
|
import { EForfeitType, 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,11 @@ export enum EForfeitType {
|
|||||||
"standard",
|
"standard",
|
||||||
"unlimited",
|
"unlimited",
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const forfeitsPrices: Record<EForfeitType, number> = {
|
||||||
|
[EForfeitType.standard]: 99,
|
||||||
|
[EForfeitType.unlimited]: 249,
|
||||||
|
};
|
||||||
export default function SubscriptionFacturation() {
|
export default function SubscriptionFacturation() {
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
const [subscription, setSubscription] = useState<Subscription | null>(null);
|
const [subscription, setSubscription] = useState<Subscription | null>(null);
|
||||||
@ -74,6 +79,8 @@ export default function SubscriptionFacturation() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
loadSubscription();
|
loadSubscription();
|
||||||
}, [loadSubscription]);
|
}, [loadSubscription]);
|
||||||
|
|
||||||
|
console.log(forfeitsPrices[EForfeitType.unlimited].toString());
|
||||||
return (
|
return (
|
||||||
<DefaultTemplate title="Nouvelle souscription">
|
<DefaultTemplate title="Nouvelle souscription">
|
||||||
{subscription && (
|
{subscription && (
|
||||||
@ -178,7 +185,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}>
|
||||||
249€
|
{/* forfeitsPrices[EForfeitType.unlimited].toString() */}€
|
||||||
<Typography typo={ITypo.H2} color={ITypoColor.BLACK}>
|
<Typography typo={ITypo.H2} color={ITypoColor.BLACK}>
|
||||||
HT
|
HT
|
||||||
</Typography>
|
</Typography>
|
||||||
|
@ -5,6 +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";
|
||||||
|
|
||||||
export default function SubscriptionNew() {
|
export default function SubscriptionNew() {
|
||||||
return (
|
return (
|
||||||
@ -63,7 +64,7 @@ export default function SubscriptionNew() {
|
|||||||
<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}>
|
||||||
249€
|
{forfeitsPrices[EForfeitType.unlimited]}€
|
||||||
<Typography typo={ITypo.H2} color={ITypoColor.BLACK}>
|
<Typography typo={ITypo.H2} color={ITypoColor.BLACK}>
|
||||||
HT
|
HT
|
||||||
</Typography>
|
</Typography>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user