GetLewvList Api
This commit is contained in:
31
ServiceHost/Areas/Client/Controllers/LeaveController.cs
Normal file
31
ServiceHost/Areas/Client/Controllers/LeaveController.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user