LT-292: Fixing timepoints sorting
This commit is contained in:
parent
248451d5d0
commit
13c422615d
@ -110,7 +110,11 @@ class TimepointApi {
|
|||||||
|
|
||||||
// Return all timepoints
|
// Return all timepoints
|
||||||
all() {
|
all() {
|
||||||
return this.timepoints.find().fetch();
|
return this.timepoints.find({}, {
|
||||||
|
sort: {
|
||||||
|
latestDate: -1
|
||||||
|
},
|
||||||
|
}).fetch();
|
||||||
}
|
}
|
||||||
|
|
||||||
// Return only the current timepoint
|
// Return only the current timepoint
|
||||||
@ -251,7 +255,7 @@ class TimepointApi {
|
|||||||
title(timepoint) {
|
title(timepoint) {
|
||||||
const timepointName = this.name(timepoint);
|
const timepointName = this.name(timepoint);
|
||||||
|
|
||||||
const all = _.clone(this.all()).reverse();
|
const all = _.clone(this.all());
|
||||||
let index = -1;
|
let index = -1;
|
||||||
let currentIndex = null;
|
let currentIndex = null;
|
||||||
for (let i = 0; i < all.length; i++) {
|
for (let i = 0; i < all.length; i++) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user