เปลี่ยนขั้นตอนการตรวจสอบการลาซ้ำไปไว้ในตอนที่จะส่ง จนท
This commit is contained in:
parent
5e7322caed
commit
38db4ed802
2 changed files with 17 additions and 10 deletions
|
|
@ -344,6 +344,13 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
var isDuplicate = await CheckDuplicateLeave(rawData.KeycloakUserId, rawData.LeaveStartDate.Date, rawData.LeaveEndDate.Date);
|
||||
if (isDuplicate)
|
||||
{
|
||||
throw new Exception("ไม่สามารถขอลาในช่วงเวลาเดียวกันได้ เนื่องจากมีการขอลาในช่วงเวลาดังกล่าวแล้ว");
|
||||
}
|
||||
|
||||
|
||||
rawData.LeaveStatus = "NEW";
|
||||
//rawData.ApproveStep = "st2";
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue