Time formatting improvements

This commit is contained in:
2017-02-06 12:17:46 -05:00
parent b4440ecd95
commit 7dcd9dec75
6 changed files with 81 additions and 15 deletions
+9 -2
View File
@@ -69,8 +69,15 @@ namespace LeafWeb.Core.DAL
li.CurrentStatus == LeafInputStatusType.Pending
? (int)li.PendingPriority
: int.MinValue)
// then the rest by the order they're added in
.ThenByDescending(li => li.Id);
// then by pending, rest by the order they're added in, ascending
.ThenBy(li =>
li.CurrentStatus == LeafInputStatusType.Pending
? li.Id
: int.MaxValue)
// then the rest descending by the order last status change
.ThenByDescending(li =>
(from s in li.StatusHistory
select s).Max(s => s.DateTime));
}
public LeafInput GetLeafInput(int id)