From d80a36ec3593062557bce86930d45776b7bbb19d Mon Sep 17 00:00:00 2001 From: mahan Date: Wed, 24 Dec 2025 16:31:32 +0330 Subject: [PATCH] add: create EmployeeController to manage employee selection for workshops --- .../Client/Controllers/EmployeeController.cs | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 ServiceHost/Areas/Client/Controllers/EmployeeController.cs diff --git a/ServiceHost/Areas/Client/Controllers/EmployeeController.cs b/ServiceHost/Areas/Client/Controllers/EmployeeController.cs new file mode 100644 index 00000000..71703125 --- /dev/null +++ b/ServiceHost/Areas/Client/Controllers/EmployeeController.cs @@ -0,0 +1,25 @@ +using _0_Framework.Application; +using CompanyManagment.App.Contracts.Employee; +using Microsoft.AspNetCore.Mvc; +using ServiceHost.BaseControllers; + +namespace ServiceHost.Areas.Client.Controllers; + +public class EmployeeController:ClientBaseController +{ + private readonly IEmployeeApplication _employeeApplication; + private readonly long _workshopId; + + public EmployeeController(IEmployeeApplication employeeApplication,IAuthHelper authHelper) + { + _employeeApplication = employeeApplication; + _workshopId = authHelper.GetWorkshopId(); + } + + [HttpGet("select-list")] + public async Task>> GetEmployeeSelectList() + { + var result = await _employeeApplication.WorkedEmployeesInWorkshopSelectList(_workshopId); + return result; + } +} \ No newline at end of file