feat(api): Немного сортировки в списках атрибутов

This commit is contained in:
Mikhail Kuznetsov
2025-09-25 09:01:37 +10:00
parent 9742f27a81
commit 6cc6dac4f7
2 changed files with 3 additions and 2 deletions

View File

@@ -39,7 +39,8 @@ namespace PARR.API.Controllers.V1
[HttpGet(ApiRoutes.UnitField.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();
if (!unitFields.Any())

View File

@@ -131,7 +131,7 @@ namespace PARR.API.MappingProfiles
},
Values = fieldGroup.Select(s => new UnitFieldValueResponse { Id = s.ValueId, Value = s.Value!.Value }).ToList()
}
)
).OrderBy(o=>o.Field.Name)
));
#endregion