From 65e3d38ac04b130fc16aaf049de1a5b29650f1b7 Mon Sep 17 00:00:00 2001 From: Maxime Lalo Date: Thu, 4 Apr 2024 10:54:11 +0200 Subject: [PATCH] :sparkles: new pages in config --- package.json | 2 +- .../DesignSystem/Header/Navigation/index.tsx | 11 +++- .../SubscriptionFacturation/index.tsx | 22 ++++--- src/front/Config/Module/development.json | 60 +++++++++++++++++++ src/front/Config/Module/preprod.json | 60 +++++++++++++++++++ src/front/Config/Module/production.json | 60 +++++++++++++++++++ src/front/Config/Module/staging.json | 60 +++++++++++++++++++ 7 files changed, 264 insertions(+), 11 deletions(-) diff --git a/package.json b/package.json index 870848ea..f3708f42 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/front/Components/DesignSystem/Header/Navigation/index.tsx b/src/front/Components/DesignSystem/Header/Navigation/index.tsx index fc98f632..d2a1764b 100644 --- a/src/front/Components/DesignSystem/Header/Navigation/index.tsx +++ b/src/front/Components/DesignSystem/Header/Navigation/index.tsx @@ -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]} /> + ); } diff --git a/src/front/Components/Layouts/Subscription/SubscriptionFacturation/index.tsx b/src/front/Components/Layouts/Subscription/SubscriptionFacturation/index.tsx index 33e3be63..1f222cb8 100644 --- a/src/front/Components/Layouts/Subscription/SubscriptionFacturation/index.tsx +++ b/src/front/Components/Layouts/Subscription/SubscriptionFacturation/index.tsx @@ -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 ( - +
@@ -71,9 +73,12 @@ export default function SubscriptionFacturation() {
{forfeitType !== EForfeitType.standard && ( - + + + )} {forfeitType === EForfeitType.standard && ( )} {forfeitType === EForfeitType.standard && ( - + + + )}
diff --git a/src/front/Config/Module/development.json b/src/front/Config/Module/development.json index ad7eef2a..a80b6c75 100644 --- a/src/front/Config/Module/development.json +++ b/src/front/Config/Module/development.json @@ -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" + } + } + } + } + } } } } diff --git a/src/front/Config/Module/preprod.json b/src/front/Config/Module/preprod.json index ad7eef2a..a80b6c75 100644 --- a/src/front/Config/Module/preprod.json +++ b/src/front/Config/Module/preprod.json @@ -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" + } + } + } + } + } } } } diff --git a/src/front/Config/Module/production.json b/src/front/Config/Module/production.json index ad7eef2a..a80b6c75 100644 --- a/src/front/Config/Module/production.json +++ b/src/front/Config/Module/production.json @@ -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" + } + } + } + } + } } } } diff --git a/src/front/Config/Module/staging.json b/src/front/Config/Module/staging.json index ad7eef2a..a80b6c75 100644 --- a/src/front/Config/Module/staging.json +++ b/src/front/Config/Module/staging.json @@ -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" + } + } + } + } + } } } }