fix(api): Добавлен маппинг Field в FieldFilter
This commit is contained in:
@@ -121,9 +121,10 @@ namespace PARR.API.MappingProfiles
|
|||||||
.ForMember(d => d.Attributes, o => o.MapFrom(s => s.UnitValues.GroupBy(g => g.Field)
|
.ForMember(d => d.Attributes, o => o.MapFrom(s => s.UnitValues.GroupBy(g => g.Field)
|
||||||
.Select(fieldGroup => new AttributeResponse
|
.Select(fieldGroup => new AttributeResponse
|
||||||
{
|
{
|
||||||
Field = new FieldResponse {
|
Field = new FieldResponse
|
||||||
|
{
|
||||||
Id = fieldGroup.Key!.Id,
|
Id = fieldGroup.Key!.Id,
|
||||||
Name = string.IsNullOrEmpty(fieldGroup.Key.DisplayName)? fieldGroup.Key.AihitName: fieldGroup.Key.DisplayName,
|
Name = string.IsNullOrEmpty(fieldGroup.Key.DisplayName) ? fieldGroup.Key.AihitName : fieldGroup.Key.DisplayName,
|
||||||
IsMultipleValue = fieldGroup.Key.IsMultipleValue
|
IsMultipleValue = fieldGroup.Key.IsMultipleValue
|
||||||
},
|
},
|
||||||
Values = fieldGroup.Select(s => new UnitFieldValueResponse { Id = s.ValueId, Value = s.Value!.Value }).ToList()
|
Values = fieldGroup.Select(s => new UnitFieldValueResponse { Id = s.ValueId, Value = s.Value!.Value }).ToList()
|
||||||
@@ -317,7 +318,8 @@ namespace PARR.API.MappingProfiles
|
|||||||
|
|
||||||
CreateMap<JobFieldFilter, FieldResponse>();
|
CreateMap<JobFieldFilter, FieldResponse>();
|
||||||
|
|
||||||
CreateMap<JobFieldFilter, FieldFilterResponse>();
|
CreateMap<JobFieldFilter, FieldFilterResponse>()
|
||||||
|
.ForMember(d => d.Field, o => o.MapFrom(s => s.UnitField));
|
||||||
|
|
||||||
CreateMap<JobRelationshipFilter, RelationshipFilterResponse>()
|
CreateMap<JobRelationshipFilter, RelationshipFilterResponse>()
|
||||||
.ForMember(d => d.Field, o => o.MapFrom(s => s.UnitField));
|
.ForMember(d => d.Field, o => o.MapFrom(s => s.UnitField));
|
||||||
|
|||||||
Reference in New Issue
Block a user