Added initial support for "mastercorporate"

This commit is contained in:
Joao Ramos
2024-07-13 17:19:42 +01:00
parent 5cfd6d56a6
commit 5d46d7e453
20 changed files with 719 additions and 182 deletions

View File

@@ -42,7 +42,7 @@ export const getServerSideProps = withIronSessionSsr(({req, res}) => {
};
}
if (shouldRedirectHome(user) || !["admin", "developer", "agent", "corporate"].includes(user.type)) {
if (shouldRedirectHome(user) || !["admin", "developer", "agent", "corporate", "mastercorporate"].includes(user.type)) {
return {
redirect: {
destination: "/",
@@ -940,7 +940,7 @@ export default function PaymentRecord() {
<div className="w-full flex flex-end justify-between p-2">
<h1 className="text-2xl font-semibold">Payment Record</h1>
<div className="flex justify-end gap-2">
{(user.type === "developer" || user.type === "admin" || user.type === "agent" || user.type === "corporate") && (
{(["developer", "admin", "agent", "corporate", "mastercorporate"].includes(user.type)) && (
<Button className="max-w-[200px]" variant="outline">
<CSVLink data={csvRows} headers={csvColumns} filename="payment-records.csv">
Download CSV