Added a screen to display the desired levels for the students of a specific corporate

This commit is contained in:
Joao Ramos
2024-06-22 00:16:30 +01:00
parent e79139174b
commit 77a22b3ab3
2 changed files with 168 additions and 0 deletions

View File

@@ -25,6 +25,7 @@ import IconCard from "./IconCard";
import useFilterStore from "@/stores/listFilterStore";
import { useRouter } from "next/router";
import usePaymentStatusUsers from "@/hooks/usePaymentStatusUsers";
import CorporateStudentsLevels from "./CorporateStudentsLevels";
interface Props {
user: User;
@@ -293,6 +294,26 @@ export default function AdminDashboard({ user }: Props) {
);
};
const CorporateStudentsLevelsHelper = () => {
return (
<>
<div className="flex flex-col gap-4">
<div
onClick={() => setPage("")}
className="flex gap-2 items-center text-mti-purple-light cursor-pointer hover:text-mti-purple-dark transition ease-in-out duration-300"
>
<BsArrowLeft className="text-xl" />
<span>Back</span>
</div>
<h2 className="text-2xl font-semibold">
Corporate Students Levels
</h2>
</div>
<CorporateStudentsLevels />
</>
);
};
const DefaultDashboard = () => (
<>
<section className="w-full grid grid-cols-2 md:grid-cols-3 lg:grid-cols-4 gap-4 place-items-center items-center justify-between">
@@ -393,6 +414,12 @@ export default function AdminDashboard({ user }: Props) {
label="Content Management System (CMS)"
color="green"
/>
<IconCard
onClick={() => setPage("corporatestudentslevels")}
Icon={BsPersonFill}
label="Corporate Students Levels"
color="purple"
/>
</section>
<section className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4 w-full justify-between">
@@ -681,6 +708,7 @@ export default function AdminDashboard({ user }: Props) {
{page === "inactiveCountryManagers" && <InactiveCountryManagerList />}
{page === "paymentdone" && <CorporatePaidStatusList paid={true} />}
{page === "paymentpending" && <CorporatePaidStatusList paid={false} />}
{page === "corporatestudentslevels" && <CorporateStudentsLevelsHelper />}
{page === "" && <DefaultDashboard />}
</>
);