refactor LeaveController to update checkout-check endpoint to accept string for seminar handling #2199
This commit is contained in:
parent
3e8c3d998e
commit
9e529ed19b
1 changed files with 3 additions and 3 deletions
|
|
@ -2397,11 +2397,11 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
/// <response code="200">เมื่อทำรายการสำเร็จ</response>
|
||||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("user/checkout-check/{isSeminar:bool}")]
|
||||
[HttpGet("user/checkout-check/{isSeminar}")]
|
||||
[ProducesResponseType(StatusCodes.Status200OK)]
|
||||
[ProducesResponseType(StatusCodes.Status401Unauthorized)]
|
||||
[ProducesResponseType(StatusCodes.Status500InternalServerError)]
|
||||
public async Task<ActionResult<ResponseObject>> CheckoutCheckAsync(bool isSeminar = false)
|
||||
public async Task<ActionResult<ResponseObject>> CheckoutCheckAsync(string isSeminar = "N")
|
||||
{
|
||||
var time = DateTime.Now;
|
||||
|
||||
|
|
@ -2435,7 +2435,7 @@ namespace BMA.EHR.Leave.Service.Controllers
|
|||
//var endTime = DateTimeOffset.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00").ToLocalTime().DateTime;
|
||||
|
||||
//var endTime = DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")}T{duty.EndTimeAfternoon}:00.0000000+07:00");
|
||||
var endTime = isSeminar
|
||||
var endTime = isSeminar.Trim().ToUpper() == "Y"
|
||||
? DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {14:30}")
|
||||
: DateTime.Parse($"{DateTime.Now.Date.ToString("yyyy-MM-dd")} {duty.EndTimeAfternoon}");
|
||||
var status = string.Empty;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue