From 9475c786d3ec6220c4b8d901ffce8d50d39845e5 Mon Sep 17 00:00:00 2001 From: mahan Date: Thu, 5 Feb 2026 11:58:52 +0330 Subject: [PATCH] add endpoint to remove employee roll calls by date --- .../RollCall/RollCallCaseHistoryController.cs | 20 +++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/ServiceHost/Areas/Client/Controllers/RollCall/RollCallCaseHistoryController.cs b/ServiceHost/Areas/Client/Controllers/RollCall/RollCallCaseHistoryController.cs index d9928860..e82b436e 100644 --- a/ServiceHost/Areas/Client/Controllers/RollCall/RollCallCaseHistoryController.cs +++ b/ServiceHost/Areas/Client/Controllers/RollCall/RollCallCaseHistoryController.cs @@ -132,7 +132,17 @@ public class RollCallCaseHistoryController : ClientBaseController var result = _rollCallApplication.ManualEdit(command); return result; } - + [HttpDelete("delete")] + public IActionResult OnPostRemoveEmployeeRollCallsInDate(RemoveEmployeeRollCallRequest request) + { + var result = _rollCallApplication.RemoveEmployeeRollCallsInDate(_workshopId, request.EmployeeId, request.Date); + + return new JsonResult(new + { + success = result.IsSuccedded, + message = result.Message, + }); + } // [HttpGet("edit")] // public ActionResult<> GetEditDetails(string date,long employeeId) @@ -181,4 +191,10 @@ public class EditRollCallDetailsResult public string DateFa { get; set; } public string TotalRollCallsDuration { get; set; } public List Records { get; set; } -} \ No newline at end of file +} + +public class RemoveEmployeeRollCallRequest +{ + public long EmployeeId { get; set; } + public string Date { get; set; } +}