diff --git a/src/dashboards/Admin.tsx b/src/dashboards/Admin.tsx index 6e1529cc..33410fd6 100644 --- a/src/dashboards/Admin.tsx +++ b/src/dashboards/Admin.tsx @@ -148,6 +148,26 @@ export default function AdminDashboard({user}: Props) { ); + const InactiveCountryManagerList = () => { + const filter = (x: User) => x.type === "agent" && (x.status === "disabled" || moment().isAfter(x.subscriptionExpirationDate)); + + return ( + <> +
+
setPage("")} + className="flex gap-2 items-center text-mti-purple-light cursor-pointer hover:text-mti-purple-dark transition ease-in-out duration-300"> + + Back +
+

Inactive Country Managers ({users.filter(filter).length})

+
+ + + + ); + } + const InactiveStudentsList = () => { const filter = (x: User) => x.type === "student" && (x.status === "disabled" || moment().isAfter(x.subscriptionExpirationDate)); @@ -235,6 +255,16 @@ export default function AdminDashboard({user}: Props) { } color="rose" /> + setPage("inactiveCountryManagers")} + Icon={BsPerson} + label="Inactive Country Managers" + value={ + users.filter((x) => x.type === "agent" && (x.status === "disabled" || moment().isAfter(x.subscriptionExpirationDate))) + .length + } + color="rose" + /> setPage("inactiveCorporate")} Icon={BsPerson} @@ -453,7 +483,9 @@ export default function AdminDashboard({user}: Props) { {page === "agents" && } {page === "inactiveStudents" && } {page === "inactiveCorporate" && } + {page === "inactiveCountryManagers" && } {page === "" && } + ); }