diff --git a/src/dashboards/Admin.tsx b/src/dashboards/Admin.tsx index b0255104..c123d1b6 100644 --- a/src/dashboards/Admin.tsx +++ b/src/dashboards/Admin.tsx @@ -331,6 +331,19 @@ export default function AdminDashboard({user}: Props) { ))} +
+ Latest teachers +
+ {users + .filter((x) => x.type === "teacher") + .sort((a, b) => { + return dateSorter(a, b, "desc", "registrationDate"); + }) + .map((x) => ( + + ))} +
+
Latest corporate
@@ -371,7 +384,7 @@ export default function AdminDashboard({user}: Props) {
- Country Manager expiring in 1 month + Teachers expiring in 1 month
{users .filter( @@ -385,6 +398,22 @@ export default function AdminDashboard({user}: Props) { ))}
+
+
+ Country Manager expiring in 1 month +
+ {users + .filter( + (x) => + x.type === "agent" && + x.subscriptionExpirationDate && + moment().isAfter(moment(x.subscriptionExpirationDate).subtract(30, "days")) && + moment().isBefore(moment(x.subscriptionExpirationDate)), + ) + .map((x) => ( + + ))} +
Corporate expiring in 1 month