feat: add endpoint to retrieve distinct workshops for roll call reporting
This commit is contained in:
@@ -1,4 +1,5 @@
|
|||||||
using _0_Framework.Application;
|
using _0_Framework.Application;
|
||||||
|
using AccountManagement.Application.Contracts.Account;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Query.AdminReports.Handlers;
|
using Query.AdminReports.Handlers;
|
||||||
using Query.AdminReports.Models;
|
using Query.AdminReports.Models;
|
||||||
@@ -27,6 +28,18 @@ public class RollCallController:AdminBaseController
|
|||||||
return result;
|
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}")]
|
[HttpGet("repoert/workfloecount/{workshopId}")]
|
||||||
public async Task<ActionResult<int>> GetWorkFlowCountByWorkshopId(long workshopId)
|
public async Task<ActionResult<int>> GetWorkFlowCountByWorkshopId(long workshopId)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user