return summary
Some checks failed
backend-action / build-image (push) Has been cancelled

This commit is contained in:
2024-05-20 12:56:36 +07:00
parent ca130dc2b8
commit 9a54c4712e

View File

@@ -14,12 +14,13 @@ export const adminRoute = router({
.findMany({ with: { province: true } })
.execute();
zones.sort((a, b) => a.province.id - b.province.id);
zones.map((z) => {
let summary = zones.map((z) => {
let num = rs.find((user) => user.zone == z.id)?.value ?? 0;
return {
count: num,
...z,
};
});
return summary;
}),
});