diff --git a/ServiceHost/Areas/Client/Controllers/RollCall/CaseHistoryController.cs b/ServiceHost/Areas/Client/Controllers/RollCall/CaseHistoryController.cs index cb2e3ff5..1e709fa0 100644 --- a/ServiceHost/Areas/Client/Controllers/RollCall/CaseHistoryController.cs +++ b/ServiceHost/Areas/Client/Controllers/RollCall/CaseHistoryController.cs @@ -1,4 +1,5 @@ using _0_Framework.Application; +using CompanyManagement.Infrastructure.Excel.RollCall; using CompanyManagment.App.Contracts.RollCall; using Microsoft.AspNetCore.Mvc; using ServiceHost.BaseControllers; @@ -49,6 +50,16 @@ public class CaseHistoryController : ClientBaseController { return await _rollCallApplication.GetCaseHistoryDetails(_workshopId, titleId, searchModel); } + + [HttpGet("excel")] + public async Task GetDownload() + { + byte[] excelBytes = RollCallExcelGenerator.CaseHistoryExcelForOneDay(caseHistoryRollCallExcelForOneDay); + return File(excelBytes, + "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", + $"{workshopFullName} - {caseHistoryRollCallExcelForOneDay.DayOfWeekFa}،{caseHistoryRollCallExcelForOneDay.DateFa}.xlsx"); + + } // [HttpGet("edit")] // public ActionResult<> GetEditDetails(string date,long employeeId)