IO-1458 IO-1465 Sorting Fixes.
This commit is contained in:
@@ -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)
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user