mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-08-01 19:50:37 +00:00
[#1829] sort challenge-box by creation date
This commit is contained in:
parent
b9d3b3a1a7
commit
4fa4519b34
2 changed files with 9 additions and 3 deletions
|
|
@ -33,7 +33,11 @@ var populateQuery = function(type, q){
|
|||
else
|
||||
q.populate(guildPopulate);
|
||||
q.populate('invites', nameFields);
|
||||
q.populate('challenges', challengeFields);
|
||||
q.populate({
|
||||
path: 'challenges',
|
||||
select: challengeFields,
|
||||
options: {sort: [['timestamp',-1]]}
|
||||
});
|
||||
return q;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -113,8 +113,10 @@ script(type='text/ng-template', id='partials/options.social.challenges.html')
|
|||
.accordion-group(ng-repeat='challenge in challenges|filter:filterChallenges')
|
||||
.accordion-heading
|
||||
ul.pull-right.challenge-accordion-header-specs
|
||||
li.
|
||||
{{challenge.group.name}} (by <span class='badge'>{{challenge.leader.profile.name}}</span>)
|
||||
li {{challenge.group.name}}
|
||||
li
|
||||
| by
|
||||
strong {{challenge.leader.profile.name}}
|
||||
li {{challenge.memberCount}} Participants
|
||||
li(ng-show='challenge.prize')
|
||||
// prize
|
||||
|
|
|
|||
Loading…
Reference in a new issue