change goals sorting to start_time descending, end_time ascending, so that long-term goals are pushed below the short-term from the same time span.
continuous-integration/drone/push Build is passing
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -51,7 +51,7 @@ func (r *goalRepository) List(ctx context.Context, filter models.GoalFilter) ([]
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
sq = sq.OrderBy("start_time", "end_time", "name")
|
sq = sq.OrderBy("start_time DESC", "end_time ASC", "name")
|
||||||
|
|
||||||
query, args, err := sq.ToSql()
|
query, args, err := sq.ToSql()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ function createGoalStore() {
|
|||||||
async load(filter: GoalFilter) {
|
async load(filter: GoalFilter) {
|
||||||
update(v => ({...v, loading: true, filter}));
|
update(v => ({...v, loading: true, filter}));
|
||||||
const goals = await stuffLogClient.listGoals(filter);
|
const goals = await stuffLogClient.listGoals(filter);
|
||||||
update(v => ({...v, loading: false, stale: false, goals: goals.reverse()}));
|
update(v => ({...v, loading: false, stale: false, goals }));
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user