CheckListHeader lista javítva

This commit is contained in:
2025-03-22 11:19:18 +01:00
parent 15e6aac88c
commit 6d78762275
3 changed files with 19 additions and 17 deletions
@@ -44,6 +44,7 @@ namespace WorkFlowCheck.BL.Mappings
CreateMap<EquipmentDTO, Equipment>();
CreateMap<CheckListHeader, CheckListHeaderDTO>()
.ForMember(dest => dest.UserDTO, opt => opt.MapFrom(src => src.User))
.ForMember(dest => dest.CheckListRowDTO, opt => opt.MapFrom(src => src.CheckListRows));
}
}
@@ -61,6 +61,7 @@ namespace WorkFlowCheck.BL.Services
{
var roles = await _dbContext.CheckListHeaders
.Include(i => i.CheckListRows)
.Include(i=>i.User)
.AsNoTracking()
.ToListAsync();
if (roles != null)
@@ -66,7 +66,8 @@
}
},
{ data: "documentNumber",
{ data: "documentNumber"},
{ data: "dateExecution",
render: function (data, type, row) {
if (!data) return '';
if (type === 'display' || type === 'filter') {
@@ -75,10 +76,9 @@
return data;
}
},
{ data: "dateExecution" },
{ data: "shortName" },
{ data: "description" },
{ data: "user.userName" },
{ data: "userDTO.userName" },
{ data: null, render: function (data, type, row) {
return renderActionButtons(row.id);
}}