update LeaveController to pass currentDate parameter to GetLastEffectRound method

This commit is contained in:
Suphonchai Phoonsawat 2026-01-09 19:11:52 +07:00
parent 95cd49ecbc
commit 3f13557b31

View file

@ -812,7 +812,7 @@ namespace BMA.EHR.Leave.Service.Controllers
return Error("ไม่พบรอบการลงเวลาทำงาน Default", StatusCodes.Status404NotFound);
}
var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile.Id);
var effectiveDate = await _userDutyTimeRepository.GetLastEffectRound(profile.Id, currentDate);
var roundId = effectiveDate != null ? effectiveDate.DutyTimeId : Guid.Empty;
var userRound = await _dutyTimeRepository.GetByIdAsync(roundId);