Update govAge calculation to use DateStart instead of DateAppoint in Leave repositories and controller
Some checks failed
Build & Deploy Leave Service / build (push) Failing after 1h5m56s
Some checks failed
Build & Deploy Leave Service / build (push) Failing after 1h5m56s
This commit is contained in:
parent
7775ea85c3
commit
09a7208074
3 changed files with 95 additions and 95 deletions
|
|
@ -108,7 +108,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
var govAge = (pf?.DateAppoint?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date);
|
||||
var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date);
|
||||
|
||||
var leaveType = await _dbContext.Set<LeaveType>().FirstOrDefaultAsync(x => x.Id == typeId);
|
||||
|
||||
|
|
@ -174,7 +174,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
|
||||
public async Task<LeaveBeginning?> GetByYearAndTypeIdForUser(int year, Guid typeId, GetProfileByKeycloakIdDto? pf)
|
||||
{
|
||||
var govAge = (pf?.DateAppoint?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date);
|
||||
var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date);
|
||||
|
||||
var leaveType = await _dbContext.Set<LeaveType>().FirstOrDefaultAsync(x => x.Id == typeId);
|
||||
|
||||
|
|
@ -247,7 +247,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
return null;
|
||||
}
|
||||
|
||||
var govAge = (pf?.DateAppoint?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date);
|
||||
var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date);
|
||||
|
||||
var leaveType = await _dbContext.Set<LeaveType>().FirstOrDefaultAsync(x => x.Id == typeId);
|
||||
|
||||
|
|
@ -337,7 +337,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
return null;
|
||||
}
|
||||
|
||||
var govAge = (pf?.DateAppoint?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date);
|
||||
var govAge = (pf?.DateStart?.Date ?? DateTime.Now.Date).DiffDay(DateTime.Now.Date);
|
||||
|
||||
var leaveType = await _dbContext.Set<LeaveType>().FirstOrDefaultAsync(x => x.Id == typeId);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue