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, });