แก้ defect เพิ่มเติม
This commit is contained in:
parent
7556a6c400
commit
56ef47dc2e
5 changed files with 21 additions and 2 deletions
|
|
@ -119,7 +119,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
||||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
var data = await _dbContext.Set<LeaveRequest>().AsQueryable()
|
||||||
.Include(x => x.Type)
|
.Include(x => x.Type)
|
||||||
.Where(x => x.LeaveStartDate.Year == year)
|
.Where(x => x.LeaveStartDate.Year == year)
|
||||||
.Where(x => x.LeaveStatus != "REJECT" || x.LeaveStatus != "DELETE")
|
.Where(x => x.LeaveStatus != "REJECT" && x.LeaveStatus != "DELETE")
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
return data;
|
return data;
|
||||||
|
|
|
||||||
|
|
@ -756,6 +756,8 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
"LATE" :
|
"LATE" :
|
||||||
"NORMAL",
|
"NORMAL",
|
||||||
CheckInDescription = d.CheckInRemark ?? "",
|
CheckInDescription = d.CheckInRemark ?? "",
|
||||||
|
IsLocationCheckIn = d.IsLocationCheckIn,
|
||||||
|
CheckInLocationName = d.CheckInLocationName ?? "",
|
||||||
|
|
||||||
CheckOutDate = d.CheckOut == null ? null : d.CheckOut.Value.Date,
|
CheckOutDate = d.CheckOut == null ? null : d.CheckOut.Value.Date,
|
||||||
CheckOutTime = d.CheckOut == null ? "" : d.CheckOut.Value.ToString("HH:mm"),
|
CheckOutTime = d.CheckOut == null ? "" : d.CheckOut.Value.ToString("HH:mm"),
|
||||||
|
|
@ -773,6 +775,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
"ABSENT" :
|
"ABSENT" :
|
||||||
"NORMAL",
|
"NORMAL",
|
||||||
CheckOutDescription = d.CheckOutRemark ?? "",
|
CheckOutDescription = d.CheckOutRemark ?? "",
|
||||||
|
|
||||||
|
IsLocationCheckOut = d.IsLocationCheckOut,
|
||||||
|
CheckOutLocationName = d.CheckOutLocationName ?? ""
|
||||||
};
|
};
|
||||||
|
|
||||||
return Success(result);
|
return Success(result);
|
||||||
|
|
|
||||||
|
|
@ -469,7 +469,9 @@ namespace BMA.EHR.Leave.Service.Controllers
|
||||||
FullName = $"{profile.Prefix.Name}{profile.FirstName} {profile.LastName}",
|
FullName = $"{profile.Prefix.Name}{profile.FirstName} {profile.LastName}",
|
||||||
DateSendLeave = item.CreatedAt.Date,
|
DateSendLeave = item.CreatedAt.Date,
|
||||||
IsDelete = item.LeaveStatus == "DELETE",
|
IsDelete = item.LeaveStatus == "DELETE",
|
||||||
Status = item.LeaveStatus
|
Status = item.LeaveStatus,
|
||||||
|
LeaveStartDate = item.LeaveStartDate,
|
||||||
|
LeaveEndDate = item.LeaveEndDate
|
||||||
};
|
};
|
||||||
result.Add(res);
|
result.Add(res);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -22,6 +22,10 @@
|
||||||
|
|
||||||
public string CheckInDescription { get; set; } = string.Empty;
|
public string CheckInDescription { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool IsLocationCheckIn { get; set; } = true;
|
||||||
|
|
||||||
|
public string? CheckInLocationName { get; set; } = string.Empty;
|
||||||
|
|
||||||
public DateTime? CheckOutDate { get; set; } = DateTime.MinValue;
|
public DateTime? CheckOutDate { get; set; } = DateTime.MinValue;
|
||||||
|
|
||||||
public string? CheckOutStatus { get; set; } = string.Empty;
|
public string? CheckOutStatus { get; set; } = string.Empty;
|
||||||
|
|
@ -37,5 +41,9 @@
|
||||||
public string? CheckOutImg { get; set; } = string.Empty;
|
public string? CheckOutImg { get; set; } = string.Empty;
|
||||||
|
|
||||||
public string? CheckOutDescription { get; set; } = string.Empty;
|
public string? CheckOutDescription { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
public bool IsLocationCheckOut { get; set; } = true;
|
||||||
|
|
||||||
|
public string? CheckOutLocationName { get; set; } = string.Empty;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,5 +15,9 @@
|
||||||
public string Status { get; set; }
|
public string Status { get; set; }
|
||||||
|
|
||||||
public bool IsDelete { get; set; }
|
public bool IsDelete { get; set; }
|
||||||
|
|
||||||
|
public DateTime LeaveStartDate { get; set; } = DateTime.Now;
|
||||||
|
|
||||||
|
public DateTime LeaveEndDate { get; set; } = DateTime.Now;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue