This commit is contained in:
@@ -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;
|
||||
}),
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user