แก้ ไปประชุม/อบรม/สัมมนา/ปฏิบัติงานที่บ้านนอกสถานที่ ให้ startTime เป็น 09:30

This commit is contained in:
Suphonchai Phoonsawat 2025-05-13 12:46:25 +07:00
parent 9e953cd5d6
commit 2f1cd53493

View file

@ -852,8 +852,16 @@ namespace BMA.EHR.Leave.Service.Controllers
ProfileType = profile.ProfileType, ProfileType = profile.ProfileType,
}; };
var startTime = "";
if (!data.IsLocation && data.LocationName == "ไปประชุม/อบรม/สัมมนา/ปฏิบัติงานที่บ้านนอกสถานที่")
{
startTime = "09:30";
}
else
startTime = duty.StartTimeMorning;
var checkInStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) > var checkInStatus = DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) >
DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.StartTimeMorning}") ? DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {startTime}") ?
DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) > DateTime.Parse(currentDate.ToString("yyyy-MM-dd HH:mm")) >
DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ? DateTime.Parse($"{currentDate.ToString("yyyy-MM-dd")} {duty.EndTimeMorning}") ?