import { Request, Response } from "express";
import { sendSuccess } from "../../common/utils/api-response";
import * as service from "./admin.dashborad.service";

export async function getDashboardStats(req: Request, res: Response) {
  const organizationId = req.tenantId as string;
  const data = await service.getDashboardStats(organizationId);
  sendSuccess(res, data, 200, "Dashboard stats fetched successfully");
}

export async function getPendingTasks(req: Request, res: Response) {
  const organizationId = req.tenantId as string;
  const data = await service.getPendingTasks(organizationId);
  sendSuccess(res, data, 200, "Pending tasks fetched successfully");
}

export async function getRejectedTasks(req: Request, res: Response) {
  const organizationId = req.tenantId as string;
  const data = await service.getRejectedTasks(organizationId);
  sendSuccess(res, data, 200, "Rejected tasks fetched successfully");
}
