Add UpdateLeaveCountAsync method to LeaveBeginningRepository and integrate it into leave request logic #2288
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m17s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m17s
This commit is contained in:
parent
639d41649c
commit
d3cc0781cf
2 changed files with 26 additions and 0 deletions
|
|
@ -733,6 +733,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
}
|
||||
|
||||
await _leaveBeginningRepository.UpdateLeaveUsageAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId, -1 * rawData.LeaveTotal);
|
||||
// update leave count ลดลง 1 ครั้ง
|
||||
await _leaveBeginningRepository.UpdateLeaveCountAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId, -1);
|
||||
|
||||
var _baseAPI = _configuration["API"];
|
||||
var apiUrlSalary = $"{_baseAPI}/org/profile/leave/cancel/{rawData.Id}";
|
||||
|
|
@ -1241,6 +1243,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
|
||||
// TODO : Update ไปตาราง beginning
|
||||
await _leaveBeginningRepository.UpdateLeaveUsageAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId, rawData.LeaveTotal);
|
||||
// update leave count เพิ่มขึ้น 1 ครั้ง
|
||||
await _leaveBeginningRepository.UpdateLeaveCountAsync(thisYear, rawData.Type.Id, rawData.KeycloakUserId, 1);
|
||||
|
||||
|
||||
var _baseAPI = _configuration["API"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue