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

Commit 43fdb74

Browse files
committed
Merge pull request #541 from appirio-tech/hotfix/sup-2582-sort-srms-by-registration-start
SUP-2582, Upcoming SRMs should be ordered by most recent date
2 parents 51519bf + f0399e1 commit 43fdb74

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

app/my-dashboard/srms/srms.controller.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
function getSRMs() {
2323
var params = {
2424
filter: 'status=future',
25+
orderBy: 'registrationStartAt',
2526
limit: 3
2627
};
2728

app/my-srms/my-srms.controller.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,9 @@
5252

5353
function changeFilter(filter) {
5454
vm.statusFilter = filter;
55-
vm.orderBy = filter === 'future'? 'startDate': 'endDate';
55+
// for upcoming SRMs sorting is done ascending order of codingStartAt
56+
// for past SRMs sorting is done descending order of codingEndAt
57+
vm.orderBy = filter === 'future'? 'codingStartAt': 'codingEndAt';
5658
vm.reverseOrder = filter !== 'future';
5759
// update url but don't reload
5860
$state.go($state.$current.name, {status: filter}, {notify: false});

0 commit comments

Comments
 (0)