/**
 * Report Routes
 */

const express = require("express");
const router = express.Router();
const { authenticate, authorize } = require("../middleware/authMiddleware");
const reportController = require("../controllers/reportController");

// Apply authentication and admin/manager authorization
router.use(authenticate);
router.use(authorize("Admin", "Manager"));

// Routes
router.get("/employee-tasks", reportController.getEmployeeTaskReport);
router.get("/completed-tasks", reportController.getCompletedTasksReport);
router.get("/pending-tasks", reportController.getPendingTasksReport);
router.get("/overdue-tasks", reportController.getOverdueTasksReport);
router.get(
  "/department-performance",
  reportController.getDepartmentPerformanceReport,
);

module.exports = router;
