Fix typo in IsProbatin property name and update related condition check in LeaveRequestController #2306
This commit is contained in:
parent
682c88c2db
commit
2410574d42
2 changed files with 9 additions and 8 deletions
|
|
@ -44,7 +44,7 @@ namespace BMA.EHR.Application.Responses.Profiles
|
|||
public string? ProfileType { get; set; }
|
||||
public bool? IsLeave { get; set; }
|
||||
|
||||
public bool? IsProbatin { get; set; }
|
||||
public bool? IsProbation { get; set; }
|
||||
|
||||
public string? Root { get; set; }
|
||||
public string? Child1 { get; set; }
|
||||
|
|
|
|||
|
|
@ -1084,12 +1084,13 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
// fix issue : ระบบลา (ขรก.) >> ลาพักผ่อน (กรณีรับราชการไม่ถึง 6 เดือน) #838
|
||||
//var leavePrevYear = (await _leaveRequestRepository.GetSumApproveLeaveAsync(fiscalYear - 1)).Where(x => x.LeaveTypeCode == "LV-005" && x.KeycloakUserId == userId).FirstOrDefault();
|
||||
//var leavePrevYearRemain = 10 - (leavePrevYear == null ? 0 : leavePrevYear.SumLeaveDay); // หายอดวันลาที่เหลือของปีก่อน
|
||||
if (profile.IsProbatin! == true)
|
||||
if (profile.IsProbation! == true)
|
||||
{
|
||||
isLeave = false;
|
||||
if (!isLeave) message = "ยังอยู่ในช่วงทดลองปฏิบัติราชการ ไม่สามารถลาพักผ่อนได้";
|
||||
}
|
||||
else if (govAge >= 180)
|
||||
//else if (govAge >= 180)
|
||||
else
|
||||
{
|
||||
isLeave = (totalDay - (sumWorkDay + sumWeekend) + approveDay) <= (limitDay);
|
||||
if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด";
|
||||
|
|
@ -1112,11 +1113,11 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
// if (!isLeave) message = "จำนวนวันลาเกินที่กำหนด";
|
||||
// }
|
||||
|
||||
else
|
||||
{
|
||||
isLeave = false;
|
||||
if (!isLeave) message = "อายุราชการน้อยกว่า 6 เดือนหรือ 180 วัน";
|
||||
}
|
||||
// else
|
||||
// {
|
||||
// isLeave = false;
|
||||
// if (!isLeave) message = "อายุราชการน้อยกว่า 6 เดือนหรือ 180 วัน";
|
||||
// }
|
||||
|
||||
break;
|
||||
case "LV-006":
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue