feat: add endpoint to retrieve distinct workshops for roll call reporting

This commit is contained in:
2025-10-27 13:25:20 +03:30
parent c5a1e5c274
commit 5d55118c3c

View File

@@ -1,4 +1,5 @@
using _0_Framework.Application;
using AccountManagement.Application.Contracts.Account;
using Microsoft.AspNetCore.Mvc;
using Query.AdminReports.Handlers;
using Query.AdminReports.Models;
@@ -27,6 +28,18 @@ public class RollCallController:AdminBaseController
return result;
}
[HttpGet("report/workshops-select-list")]
public ActionResult<List<WorkshopSelectList>> GetWorkshopsSelectList()
{
var result = _workshopWithRollCallHandler.Handle(new WorkshopWithRollCallServiceQueryParameters())
.Select(x => new WorkshopSelectList
{
Id = x.WorkshopId,
WorkshopFullName = x.WorkshopName
}).Distinct().ToList();
return result;
}
[HttpGet("repoert/workfloecount/{workshopId}")]
public async Task<ActionResult<int>> GetWorkFlowCountByWorkshopId(long workshopId)
{