feat(api): Немного сортировки в списках атрибутов
This commit is contained in:
@@ -39,7 +39,8 @@ namespace PARR.API.Controllers.V1
|
|||||||
[HttpGet(ApiRoutes.UnitField.GetAll)]
|
[HttpGet(ApiRoutes.UnitField.GetAll)]
|
||||||
public async Task<IActionResult> GetAll()
|
public async Task<IActionResult> GetAll()
|
||||||
{
|
{
|
||||||
var unitFields = await unitFieldService.Get().OrderBy(t => t.DisplayName)
|
var unitFields = await unitFieldService.Get()
|
||||||
|
.OrderBy(t => t.AihitName)
|
||||||
.ToListAsync();
|
.ToListAsync();
|
||||||
|
|
||||||
if (!unitFields.Any())
|
if (!unitFields.Any())
|
||||||
|
|||||||
@@ -131,7 +131,7 @@ namespace PARR.API.MappingProfiles
|
|||||||
},
|
},
|
||||||
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()
|
||||||
}
|
}
|
||||||
)
|
).OrderBy(o=>o.Field.Name)
|
||||||
));
|
));
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user