Update leave limit logic and add GovAge property to user leave profile DTO
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m10s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m10s
This commit is contained in:
parent
c25bef0672
commit
1a0e712a1c
2 changed files with 8 additions and 1 deletions
|
|
@ -900,7 +900,11 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
if (govAge < 180)
|
||||
leaveLimit = 0;
|
||||
else
|
||||
leaveLimit = leaveData == null ? 0 : leaveData.LeaveDays;
|
||||
{
|
||||
leaveLimit = leaveData == null ?
|
||||
govAge < 180 ? 0 : 10
|
||||
: leaveData.LeaveDays;
|
||||
}
|
||||
}
|
||||
else
|
||||
leaveLimit = leaveType.Limit;
|
||||
|
|
@ -955,6 +959,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
CurrentDistrict = profile.CurrentDistrict ?? "",
|
||||
CurrentProvince = profile.CurrentProvince ?? "",
|
||||
CurrentZipCode = profile.CurrentZipCode ?? "",
|
||||
GovAge = govAge
|
||||
};
|
||||
|
||||
return Success(result);
|
||||
|
|
|
|||
|
|
@ -51,5 +51,7 @@
|
|||
public string? CurrentProvince { get; set; }
|
||||
|
||||
public string? CurrentZipCode { get; set; }
|
||||
|
||||
public int GovAge { get; set; } = 0;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue