fix defect and add new api
This commit is contained in:
parent
576c43749a
commit
019a400028
7 changed files with 1180 additions and 6 deletions
|
|
@ -147,6 +147,7 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
{
|
||||
var rawData = _dbContext.Set<LeaveRequest>()
|
||||
.Include(x => x.Type)
|
||||
.Where(x => x.LeaveStatus != "DRAFT")
|
||||
.AsQueryable();
|
||||
|
||||
|
||||
|
|
@ -307,6 +308,20 @@ namespace BMA.EHR.Application.Repositories.Leaves.LeaveRequests
|
|||
await _appDbContext.SaveChangesAsync();
|
||||
}
|
||||
|
||||
public async Task SendToOfficerAsync(Guid id)
|
||||
{
|
||||
var rawData = await GetByIdAsync(id);
|
||||
if (rawData == null)
|
||||
{
|
||||
throw new Exception(GlobalMessages.DataNotFound);
|
||||
}
|
||||
|
||||
rawData.LeaveStatus = "NEW";
|
||||
//rawData.ApproveStep = "st2";
|
||||
|
||||
await UpdateAsync(rawData);
|
||||
}
|
||||
|
||||
public async Task OfficerApproveLeaveRequest(Guid id)
|
||||
{
|
||||
var rawData = await GetByIdAsync(id);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue