Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit e632b96

Browse files
committed
Merge pull request #566 from appirio-tech/feature/SUP-2608
Added sorting of submissions by placement
2 parents 26373e3 + 285db10 commit e632b96

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/directives/challenge-user-place/challenge-user-place.directive.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@
4848
$scope.challenge.userDetails.submissions = $scope.challenge.userDetails.submissions.filter(function(submission) {
4949
return submission && submission.submissionImage;
5050
});
51+
$scope.challenge.userDetails.submissions = _.sortBy($scope.challenge.userDetails.submissions, function(submission) {
52+
return submission.placement;
53+
});
5154
}
5255
if (!$scope.challenge.isPrivate && $scope.challenge.userDetails && $scope.challenge.userDetails.submissions && $scope.challenge.userDetails.submissions.length > 0) {
5356
$scope.numImages = $scope.challenge.userDetails.submissions.length;

0 commit comments

Comments
 (0)