This commit is contained in:
2021-11-22 15:47:38 +00:00
parent df3f5830c9
commit a5d11b7dab

View File

@@ -247,6 +247,8 @@ namespace AyaNova.Biz
//
internal async Task<List<NameIdItem>> GetReportListAsync(AyaType aType)
{
//Let postgres sort the names so that they appear with the emoji symbols last in the list which we use for sample reports to
//not pollute the regular reports
var rpts = await ct.Report.AsNoTracking().Where(z => z.AType == aType && z.Active == true).Select(z => new { id = z.Id, name = z.Name, roles = z.Roles }).OrderBy(z=>z.name).ToListAsync();
var ret = new List<NameIdItem>();
foreach (var item in rpts)
@@ -256,9 +258,7 @@ namespace AyaNova.Biz
ret.Add(new NameIdItem() { Name = item.name, Id = item.id });
}
}
return ret;
//Sort by name
//return ret.OrderBy(z => z.Name).ToList();
return ret;
}