fix : Logic check เตือนกรณีเช็คอินและเช็คเอาท์แล้ว ในวันนั้นๆ
Some checks failed
release-dev / release-dev (push) Failing after 13s
Some checks failed
release-dev / release-dev (push) Failing after 13s
This commit is contained in:
parent
30281ff2ab
commit
6a3868fd0d
1 changed files with 17 additions and 17 deletions
|
|
@ -425,26 +425,26 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// ถ้า check-in + check-out ไปแล้ว
|
|
||||||
if (data.CheckIn.Date == DateTime.Now.Date)
|
|
||||||
{
|
|
||||||
return Error("คุณได้ทำการลงเวลาเข้าและออกเรียบร้อยแล้ว คุณจะสามารถลงเวลาได้อีกครั้งในวันถัดไป");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (data.CheckOut != null)
|
if (data.CheckOut != null)
|
||||||
{
|
{
|
||||||
|
// ถ้า check-in + check-out ไปแล้ว
|
||||||
|
if (data.CheckOut.Value.Date == DateTime.Now.Date)
|
||||||
ret = new CheckInResultDto
|
|
||||||
{
|
{
|
||||||
StartTimeMorning = duty == null ? "00:00" : duty.StartTimeMorning,
|
return Error("คุณได้ทำการลงเวลาเข้าและออกเรียบร้อยแล้ว คุณจะสามารถลงเวลาได้อีกครั้งในวันถัดไป");
|
||||||
EndTimeMorning = duty == null ? "00:00" : duty.EndTimeMorning,
|
}
|
||||||
StartTimeAfternoon = duty == null ? "00:00" : duty.StartTimeAfternoon,
|
else
|
||||||
EndTimeAfternoon = duty == null ? "00:00" : duty.EndTimeAfternoon,
|
{
|
||||||
Description = duty == null ? "-" : duty.Description,
|
ret = new CheckInResultDto
|
||||||
CheckInTime = null,
|
{
|
||||||
CheckInId = null,
|
StartTimeMorning = duty == null ? "00:00" : duty.StartTimeMorning,
|
||||||
};
|
EndTimeMorning = duty == null ? "00:00" : duty.EndTimeMorning,
|
||||||
|
StartTimeAfternoon = duty == null ? "00:00" : duty.StartTimeAfternoon,
|
||||||
|
EndTimeAfternoon = duty == null ? "00:00" : duty.EndTimeAfternoon,
|
||||||
|
Description = duty == null ? "-" : duty.Description,
|
||||||
|
CheckInTime = null,
|
||||||
|
CheckInId = null,
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue