fix addition checkin
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m53s
All checks were successful
Build & Deploy Leave Service / build (push) Successful in 1m53s
This commit is contained in:
parent
80fcda61cf
commit
91c479ef9e
1 changed files with 9 additions and 0 deletions
|
|
@ -3136,8 +3136,17 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
{
|
||||
return Error("ไม่สามารถขอลงเวลากรณีพิเศษในวันที่มากกว่าวันที่ปัจจุบันได้", StatusCodes.Status400BadRequest);
|
||||
}
|
||||
|
||||
|
||||
|
||||
var userId = UserId != null ? Guid.Parse(UserId) : Guid.Empty;
|
||||
|
||||
var checkin = await _userTimeStampRepository.GetTimestampByDateAsync(userId, req.CheckDate.Date);
|
||||
if (checkin != null && checkin.CheckOut == null)
|
||||
{
|
||||
return Error("ระบบพบรายการลงเวลาของวันที่ต้องการแก้ไข แต่ยังไม่มีข้อมูลการลงเวลาออก กรุณาลงเวลาออกให้เรียบร้อยก่อนดำเนินการ");
|
||||
}
|
||||
|
||||
var profile = await _userProfileRepository.GetProfileByKeycloakIdNew2Async(userId, AccessToken);
|
||||
if (profile == null)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue