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", "version": "0.1.0",
"private": true, "private": true,
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev -p 5005",
"build": "next build", "build": "next build",
"start": "next start", "start": "next start",
"lint": "next lint", "lint": "next lint",

View File

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

View File

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

View File

@ -270,6 +270,66 @@
"path": "/404", "path": "/404",
"labelKey": "not_found" "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", "path": "/404",
"labelKey": "not_found" "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", "path": "/404",
"labelKey": "not_found" "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", "path": "/404",
"labelKey": "not_found" "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"
}
}
}
}
}
} }
} }
} }