mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
save
This commit is contained in:
@@ -15,7 +15,7 @@ export class SortService {
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sortArrayByDate(myArray: any) {
|
||||
console.log(myArray[0].taskStartDate);
|
||||
if(myArray.length > 0){
|
||||
@@ -26,13 +26,8 @@ export class SortService {
|
||||
}
|
||||
|
||||
sortDate(array = [], path: string) {
|
||||
|
||||
return array.sort( (a,b)=> {
|
||||
|
||||
return new Date(this.ObjectService.deepFind(b, path)).getTime() -
|
||||
new Date(this.ObjectService.deepFind(a, path)).getTime()
|
||||
|
||||
return new Date(this.ObjectService.deepFind(b, path)).getTime() - new Date(this.ObjectService.deepFind(a, path)).getTime()
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user