IO-1458 IO-1465 Sorting Fixes.

This commit is contained in:
Patrick Fic
2021-10-13 11:52:11 -07:00
parent d2b965f79e
commit 3e84fbbaf4
2 changed files with 15 additions and 6 deletions

View File

@@ -9,11 +9,11 @@ export function alphaSort(a, b) {
}
export function dateSort(a, b) {
return new Date(b) - new Date(a);
return new Date(a) - new Date(b);
}
export function statusSort(a, b, statusList) {
return (
statusList.findIndex((x) => x === a) > statusList.findIndex((x) => x === b)
statusList.findIndex((x) => x === a) - statusList.findIndex((x) => x === b)
);
}