This commit is contained in:
@@ -228,12 +228,13 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var sorted = slist.OrderBy(z => z.customername).ThenBy(z => z.serial);
|
var sorted = slist.OrderBy(z => z.CustomerName).ThenBy(z => z.UnitSerial);
|
||||||
|
|
||||||
return Ok(ApiOkResponse.Response(sorted.Select(z => new NameIdItem { Id = z.unitid, Name = $"{z.serial} {z.customername}" }).ToList()));
|
//return Ok(ApiOkResponse.Response(sorted.Select(z => new NameIdItem { Id = z.unitid, Name = $"{z.serial} {z.customername}" }).ToList()));
|
||||||
|
return Ok(ApiOkResponse.Response(sorted));
|
||||||
}
|
}
|
||||||
public record UnitListByTagParams(List<string> tags, long? restrictToCustomerId);
|
public record UnitListByTagParams(List<string> tags, long? restrictToCustomerId);
|
||||||
private record InternalUnitListForSorting(string customername, string serial, long unitid);
|
private record InternalUnitListForSorting(string CustomerName, string UnitSerial, long UnitId);
|
||||||
//------------
|
//------------
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user