feat(api): в ApplicationInWork добавлена информация о статусах AutoControl
This commit is contained in:
@@ -74,7 +74,8 @@ namespace PARR.API.Controllers.V1
|
||||
query = query
|
||||
.Include(t => t.Work)
|
||||
//.Include(t => t.Templates) - большой запрос, делаем его отдельно
|
||||
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup);
|
||||
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup)
|
||||
.Include(t => t.JobAutoControl);
|
||||
}
|
||||
|
||||
query = query.OrderBy(t => t.ShortDescription).ThenBy(t => t.Application!.Name);
|
||||
@@ -123,6 +124,7 @@ namespace PARR.API.Controllers.V1
|
||||
.Include(t => t.Work)
|
||||
//.Include(t => t.Templates)
|
||||
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup)
|
||||
.Include(t => t.JobAutoControl)
|
||||
.FirstOrDefaultAsync(t => t.Id == id);
|
||||
|
||||
if (applicationInWork == null)
|
||||
@@ -206,6 +208,7 @@ namespace PARR.API.Controllers.V1
|
||||
.Include(t => t.Work)
|
||||
//.Include(t => t.Templates)
|
||||
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup)
|
||||
.Include(t => t.JobAutoControl)
|
||||
.FirstAsync(t => t.Id == applicationInWork.Id);
|
||||
|
||||
var locationUri = uriService.GetUri(ApiRoutes.Job.Get, ApiRoutes.Job.getParam, createdApplicationInWork.Id);
|
||||
@@ -320,6 +323,7 @@ namespace PARR.API.Controllers.V1
|
||||
.Include(t => t.Work)
|
||||
//.Include(t => t.Templates)
|
||||
.Include(t => t.WorkGroups).ThenInclude(t => t.WorkGroup)
|
||||
.Include(t => t.JobAutoControl)
|
||||
.FirstAsync(t => t.Id == orig.Id);
|
||||
|
||||
var response = mapper.Map<ApplicationInWorkResponse>(updatedApplicationInWork);
|
||||
|
||||
Reference in New Issue
Block a user