We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 4c9440f + 6a833c5 commit 27bbbe4Copy full SHA for 27bbbe4
1 file changed
Backend/controllers/dashboard.controller.js
@@ -42,7 +42,7 @@ const getDashboardData = async (req, res) => {
42
const limit = Math.max(1, Math.min(100, Number(req.query.limit) || 10));
43
44
// 1. Get employee statistics
45
- const totalEmployees = await User.countDocuments({});
+ const totalEmployees = await User.countDocuments({ active: true });
46
const resignedEmployees = await User.countDocuments({ active: false }); // Changed from isActive to active
47
48
// 2. Get project statistics
0 commit comments