gwm
This commit is contained in:
parent
76e972cf34
commit
f9d2aa4a26
@ -167,13 +167,12 @@ exports.adminDashboard = async (req, res) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const QuarterlyWindows = 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 quarterlyWindows = await QuarterlyWindowsConfiguration.findOne({ where: whereCond });
|
||||||
|
|
||||||
const totalEstablishments = await Establishment.count();
|
const totalEstablishments = await Establishment.count();
|
||||||
const submittedCount = await Submission.count({ where: { ...whereCond, status: "Submitted" } });
|
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" } });
|
||||||
@ -234,7 +233,7 @@ exports.adminDashboard = async (req, res) => {
|
|||||||
pending: pendingCount,
|
pending: pendingCount,
|
||||||
not_started: notStartedCount,
|
not_started: notStartedCount,
|
||||||
},
|
},
|
||||||
quarterly_windows : QuarterlyWindows,
|
quarterly_windows : quarterlyWindows,
|
||||||
recent_submissions: recentSubmissions,
|
recent_submissions: recentSubmissions,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user