feat(dashboard): add optional CommonRequestDto parameter to GetManagerSummary

Add optional CommonRequestDto parameter to GetManagerSummary method in both service interface and implementation, and update the controller endpoint to accept it as a query parameter. This allows passing common request data (e.g., pagination, filtering) to the dashboard summary retrieval.
This commit is contained in:
2026-06-09 23:35:16 +03:30
parent adcee56ce8
commit f2880a2167
2 changed files with 8 additions and 4 deletions

View File

@@ -1,4 +1,5 @@
using Complex.Application;
using Complex.Application.Common;
using Complex.Common.Dto;
using Complex.Domain.Entities;
using Microsoft.EntityFrameworkCore;
@@ -7,7 +8,7 @@ namespace Complex.Application.Services.Dashboard
{
public interface IDashboardService
{
ResultDto<DashboardSummaryDto> GetManagerSummary(Guid complexId);
ResultDto<DashboardSummaryDto> GetManagerSummary(Guid complexId, CommonRequestDto? commonRequest = null);
}
public class DashboardService : IDashboardService
@@ -19,7 +20,7 @@ namespace Complex.Application.Services.Dashboard
_complexDBContext = complexDBContext;
}
public ResultDto<DashboardSummaryDto> GetManagerSummary(Guid complexId)
public ResultDto<DashboardSummaryDto> GetManagerSummary(Guid complexId, CommonRequestDto? commonRequest = null)
{
var units = _complexDBContext.Units.Where(u => u.ComplexId == complexId);