plane/web/constants/kanban-helpers.ts
guru_sainath e28919a964
chore: cycles, modules store integration, list and kanban layouts and updated kanban logic (#2399)
* chore: cycle, cycle-issue, cycle-filters, cycle-kanban, cycle layout setup

* chore: cycles kanban and list view store

* chore: cycles, modules kanban and list, kanban view store
2023-10-09 14:28:42 +05:30

20 lines
575 B
TypeScript

export const sortArrayByDate = (_array: any[], _key: string): any[] => {
console.log("date sorting");
// return _array.sort((a, b) => {
// const x = new Date(a[_key]);
// const y = new Date(b[_key]);
// return x > y ? -1 : x < y ? 1 : 0;
// });
return _array;
};
export const sortArrayByPriority = (_array: any[], _key: string): any[] => {
console.log("priority sorting");
// return _array.sort((a, b) => {
// const x = new Date(a[_key]);
// const y = new Date(b[_key]);
// return x > y ? -1 : x < y ? 1 : 0;
// });
return _array;
};