gwm
This commit is contained in:
parent
1382f9bb5b
commit
215977dbd3
@ -167,12 +167,15 @@ exports.adminDashboard = async (req, res) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
const lastConfig = await QuarterlyWindowsConfiguration.findOne({ where: whereCond });
|
||||||
|
|
||||||
const whereCond = {};
|
const whereCond = {};
|
||||||
if (quarter) whereCond.quarter = quarter;
|
if (quarter) whereCond.quarter = quarter;
|
||||||
if (year) whereCond.year = year;
|
if (year) whereCond.year = year;
|
||||||
|
|
||||||
const totalEstablishments = await Establishment.count();
|
const totalEstablishments = await Establishment.count();
|
||||||
const submittedCount = await Submission.count({ where: whereCond });
|
const submittedCount = await Submission.count({ where: { ...whereCond, status: "Submitted" } });
|
||||||
const approvedCount = await Submission.count({ where: { ...whereCond, status: "Approved" } });
|
const approvedCount = await Submission.count({ where: { ...whereCond, status: "Approved" } });
|
||||||
const rejectedCount = await Submission.count({ where: { ...whereCond, status: "Rejected" } });
|
const rejectedCount = await Submission.count({ where: { ...whereCond, status: "Rejected" } });
|
||||||
const pendingCount = await Submission.count({ where: { ...whereCond, status: "Pending" } });
|
const pendingCount = await Submission.count({ where: { ...whereCond, status: "Pending" } });
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user