new pages in config

This commit is contained in:
Maxime Lalo 2024-04-04 10:54:11 +02:00
parent 3e3aebc67e
commit 65e3d38ac0
7 changed files with 264 additions and 11 deletions

View File

@ -3,7 +3,7 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"dev": "next dev -p 5005",
"build": "next build",
"start": "next start",
"lint": "next lint",

View File

@ -40,11 +40,11 @@ export default function Navigation() {
read: false,
},
include: {
notification: true
notification: true,
},
orderBy: {
notification: {created_at: "desc"},
}
notification: { created_at: "desc" },
},
});
notifications.forEach((notification) => {
Toasts.getInstance().open({
@ -89,6 +89,11 @@ export default function Navigation() {
routesActive={[Module.getInstance().get().modules.pages.Collaborators.props.path]}
/>
</Rules>
<HeaderLink
text={"Facturation"}
path={Module.getInstance().get().modules.pages.Subscription.pages.Facturation.props.path}
routesActive={[Module.getInstance().get().modules.pages.Subscription.pages.Facturation.props.path]}
/>
</div>
);
}

View File

@ -6,6 +6,8 @@ import { useCallback, useState } from "react";
import Confirm from "@Front/Components/DesignSystem/Modal/Confirm";
import useOpenable from "@Front/Hooks/useOpenable";
import MessageBox from "@Front/Components/Elements/MessageBox";
import Link from "next/link";
import Module from "@Front/Config/Module";
export enum EForfeitType {
"standard",
@ -23,7 +25,7 @@ export default function SubscriptionFacturation() {
}, [closeCancelSubscription, openConfirmation]);
return (
<DefaultTemplate title="Nouvelle souscription" hasHeaderLinks={false}>
<DefaultTemplate title="Nouvelle souscription">
<div className={classes["root"]}>
<div className={classes["top-container"]}>
<div className={classes["top-container-title"]}>
@ -71,9 +73,12 @@ export default function SubscriptionFacturation() {
</div>
<div className={classes["button-container"]}>
{forfeitType !== EForfeitType.standard && (
<Link
href={Module.getInstance().get().modules.pages.Subscription.pages.Subscribe.pages.Standard.props.path}>
<Button fullwidth variant={EButtonVariant.GHOST}>
Rétrograder mon abonnement
</Button>
</Link>
)}
{forfeitType === EForfeitType.standard && (
<Button fullwidth variant={EButtonVariant.PRIMARY}>
@ -120,9 +125,12 @@ export default function SubscriptionFacturation() {
</Button>
)}
{forfeitType === EForfeitType.standard && (
<Link
href={Module.getInstance().get().modules.pages.Subscription.pages.Subscribe.pages.Illimity.props.path}>
<Button fullwidth variant={EButtonVariant.GHOST}>
Améliorer mon abonnement
</Button>
</Link>
)}
</div>
</div>

View File

@ -270,6 +270,66 @@
"path": "/404",
"labelKey": "not_found"
}
},
"Subscription": {
"enabled": true,
"props": {
"path": "/subscription",
"labelKey": "subscription"
},
"pages": {
"Facturation": {
"enabled": true,
"props": {
"path": "/subscription/facturation",
"labelKey": "facturation"
}
},
"New": {
"enabled": true,
"props": {
"path": "/subscription/new",
"labelKey": "subscribe"
}
},
"Error": {
"enabled": true,
"props": {
"path": "/subscription/error",
"labelKey": "error"
}
},
"Success": {
"enabled": true,
"props": {
"path": "/subscription/success",
"labelKey": "success"
}
},
"Subscribe": {
"enabled": true,
"props": {
"path": "/subscription/subscribe",
"labelKey": "subscribe"
},
"pages": {
"Standard": {
"enabled": true,
"props": {
"path": "/subscription/subscribe/standard",
"labelKey": "standard"
}
},
"Illimity": {
"enabled": true,
"props": {
"path": "/subscription/subscribe/illimity",
"labelKey": "illimity"
}
}
}
}
}
}
}
}

View File

@ -270,6 +270,66 @@
"path": "/404",
"labelKey": "not_found"
}
},
"Subscription": {
"enabled": true,
"props": {
"path": "/subscription",
"labelKey": "subscription"
},
"pages": {
"Facturation": {
"enabled": true,
"props": {
"path": "/subscription/facturation",
"labelKey": "facturation"
}
},
"New": {
"enabled": true,
"props": {
"path": "/subscription/new",
"labelKey": "subscribe"
}
},
"Error": {
"enabled": true,
"props": {
"path": "/subscription/error",
"labelKey": "error"
}
},
"Success": {
"enabled": true,
"props": {
"path": "/subscription/success",
"labelKey": "success"
}
},
"Subscribe": {
"enabled": true,
"props": {
"path": "/subscription/subscribe",
"labelKey": "subscribe"
},
"pages": {
"Standard": {
"enabled": true,
"props": {
"path": "/subscription/subscribe/standard",
"labelKey": "standard"
}
},
"Illimity": {
"enabled": true,
"props": {
"path": "/subscription/subscribe/illimity",
"labelKey": "illimity"
}
}
}
}
}
}
}
}

View File

@ -270,6 +270,66 @@
"path": "/404",
"labelKey": "not_found"
}
},
"Subscription": {
"enabled": true,
"props": {
"path": "/subscription",
"labelKey": "subscription"
},
"pages": {
"Facturation": {
"enabled": true,
"props": {
"path": "/subscription/facturation",
"labelKey": "facturation"
}
},
"New": {
"enabled": true,
"props": {
"path": "/subscription/new",
"labelKey": "subscribe"
}
},
"Error": {
"enabled": true,
"props": {
"path": "/subscription/error",
"labelKey": "error"
}
},
"Success": {
"enabled": true,
"props": {
"path": "/subscription/success",
"labelKey": "success"
}
},
"Subscribe": {
"enabled": true,
"props": {
"path": "/subscription/subscribe",
"labelKey": "subscribe"
},
"pages": {
"Standard": {
"enabled": true,
"props": {
"path": "/subscription/subscribe/standard",
"labelKey": "standard"
}
},
"Illimity": {
"enabled": true,
"props": {
"path": "/subscription/subscribe/illimity",
"labelKey": "illimity"
}
}
}
}
}
}
}
}

View File

@ -270,6 +270,66 @@
"path": "/404",
"labelKey": "not_found"
}
},
"Subscription": {
"enabled": true,
"props": {
"path": "/subscription",
"labelKey": "subscription"
},
"pages": {
"Facturation": {
"enabled": true,
"props": {
"path": "/subscription/facturation",
"labelKey": "facturation"
}
},
"New": {
"enabled": true,
"props": {
"path": "/subscription/new",
"labelKey": "subscribe"
}
},
"Error": {
"enabled": true,
"props": {
"path": "/subscription/error",
"labelKey": "error"
}
},
"Success": {
"enabled": true,
"props": {
"path": "/subscription/success",
"labelKey": "success"
}
},
"Subscribe": {
"enabled": true,
"props": {
"path": "/subscription/subscribe",
"labelKey": "subscribe"
},
"pages": {
"Standard": {
"enabled": true,
"props": {
"path": "/subscription/subscribe/standard",
"labelKey": "standard"
}
},
"Illimity": {
"enabled": true,
"props": {
"path": "/subscription/subscribe/illimity",
"labelKey": "illimity"
}
}
}
}
}
}
}
}