Skip to content

Commit 27bbbe4

Browse files
authored
Merge pull request #78 from PentabyteDevAlign/refactor
fix: count total emp dashboard hr
2 parents 4c9440f + 6a833c5 commit 27bbbe4

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Backend/controllers/dashboard.controller.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const getDashboardData = async (req, res) => {
4242
const limit = Math.max(1, Math.min(100, Number(req.query.limit) || 10));
4343

4444
// 1. Get employee statistics
45-
const totalEmployees = await User.countDocuments({});
45+
const totalEmployees = await User.countDocuments({ active: true });
4646
const resignedEmployees = await User.countDocuments({ active: false }); // Changed from isActive to active
4747

4848
// 2. Get project statistics

0 commit comments

Comments
 (0)