From 7cd06be198a356833d0bcb643a6cd085f464a63d Mon Sep 17 00:00:00 2001 From: kittapath Date: Fri, 6 Dec 2024 12:19:23 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=81=E0=B8=81=E0=B9=89=E0=B8=9A=E0=B8=B1?= =?UTF-8?q?=E0=B8=99=E0=B8=97=E0=B8=B6=E0=B8=81=E0=B8=A7=E0=B8=B1=E0=B8=99?= =?UTF-8?q?=E0=B8=A5=E0=B8=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Leaves/LeaveRequests/LeaveRequestRepository.cs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs index 481cbfa7..7ec99c03 100644 --- a/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs +++ b/BMA.EHR.Application/Repositories/Leaves/LeaveRequests/LeaveRequestRepository.cs @@ -108,13 +108,13 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests if (entity.LeaveDocument != null) { - foreach(var d in entity.LeaveDocument) + foreach (var d in entity.LeaveDocument) { _dbContext.Attatch(d); } - + } - + if (entity.Type != null) _dbContext.Attatch(entity.Type); @@ -334,7 +334,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests return await rawData.ToListAsync(); } - public async Task ApproveCancelLeaveRequestAsync(LeaveRequest data,string Reason) + public async Task ApproveCancelLeaveRequestAsync(LeaveRequest data, string Reason) { try { @@ -365,7 +365,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests { throw; } - + } @@ -564,9 +564,9 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests leaveTypeId = rawData?.Type?.Id ?? null, dateLeaveStart = rawData.LeaveStartDate, dateLeaveEnd = rawData.LeaveEndDate, - leaveDays = 0,//หน้า fe ไม่ได้ใช้ + totalLeave = 0,//หน้า fe ไม่ได้ใช้ leaveCount = 0,//หน้า fe ไม่ได้ใช้ - totalLeave = rawData.LeaveTotal, + leaveDays = rawData.LeaveTotal, status = "approve", reason = rawData.LeaveDetail, });