GetLewvList Api

This commit is contained in:
SamSys
2025-12-23 17:03:54 +03:30
parent 132c8ac5a4
commit 89de3162de
8 changed files with 245 additions and 16 deletions

View File

@@ -0,0 +1,31 @@
using _0_Framework.Application;
using CompanyManagment.App.Contracts.InsuranceList;
using CompanyManagment.App.Contracts.Leave;
using Microsoft.AspNetCore.Mvc;
using ServiceHost.BaseControllers;
namespace ServiceHost.Areas.Client.Controllers;
public class LeaveController : ClientBaseController
{
private readonly ILeaveApplication _leaveApplication;
private long _workshopId;
public LeaveController(ILeaveApplication leaveApplication, IAuthHelper authHelper)
{
_leaveApplication = leaveApplication;
_workshopId = authHelper.GetWorkshopId();
}
/// <summary>
/// دریافت لیست مرخصی ها
/// </summary>
/// <param name="searchModel"></param>
/// <returns></returns>
[HttpGet("GetLeaveList")]
public async Task<ActionResult<PagedResult<leaveListDto>>> GetLeaveList(LeaveListSearchModel searchModel)
{
searchModel.WorkshopId = _workshopId;
var leaveList = await _leaveApplication.GetList(searchModel);
return Ok(leaveList);
}
}