fix #1511 และเปลี่ยน Env เพิ่ม VITE_URL_MGT
This commit is contained in:
parent
0b407f3c68
commit
48baf99adf
4 changed files with 9 additions and 6 deletions
|
|
@ -57,7 +57,8 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
_emailSenderService = emailSenderService;
|
||||
_appDbContext = appDbContext;
|
||||
|
||||
URL = (_configuration["API"]).Replace("/api/v1", "");
|
||||
URL = (_configuration["VITE_URL_MGT"]).Replace("/api/v1", "");
|
||||
Console.WriteLine($"URL : {URL}");
|
||||
_minIOService = minIOService;
|
||||
_leaveBeginningRepository = leaveBeginningRepository;
|
||||
}
|
||||
|
|
@ -478,10 +479,11 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
return data;
|
||||
}
|
||||
|
||||
public async Task<LeaveRequest?> GetLastLeaveRequestByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId)
|
||||
public async Task<LeaveRequest?> GetLastLeaveRequestByTypeForUserAsync(Guid keycloakUserId, Guid leaveTypeId,DateTime beforeDate)
|
||||
{
|
||||
var data = await _dbContext.Set<LeaveRequest>().AsQueryable().AsNoTracking()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.LeaveStartDate.Date < beforeDate.Date)
|
||||
.Where(x => x.KeycloakUserId == keycloakUserId)
|
||||
.Where(x => x.Type.Id == leaveTypeId)
|
||||
.Where(x => x.LeaveStatus == "APPROVE")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue