This commit is contained in:
@@ -14,12 +14,13 @@ export const adminRoute = router({
|
|||||||
.findMany({ with: { province: true } })
|
.findMany({ with: { province: true } })
|
||||||
.execute();
|
.execute();
|
||||||
zones.sort((a, b) => a.province.id - b.province.id);
|
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;
|
let num = rs.find((user) => user.zone == z.id)?.value ?? 0;
|
||||||
return {
|
return {
|
||||||
count: num,
|
count: num,
|
||||||
...z,
|
...z,
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
return summary;
|
||||||
}),
|
}),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user