Skip to content

Commit

Permalink
Frontend_V2: Fix S.No in my submissions page(Cloud-CV#3425)
Browse files Browse the repository at this point in the history
Co-authored-by: Rishabh Jain <rishabhjain2018@gmail.com>
  • Loading branch information
2 people authored and burnerlee committed Jun 14, 2021
1 parent 6061566 commit 64c9cec
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,12 @@ export class ChallengesubmissionsComponent implements OnInit, AfterViewInit {
SELF.paginationDetails.currentPage = Math.ceil(data.next.split('page=')[1] - 1);
}

let index = (SELF.paginationDetails.currentPage-1)*10;
SELF.submissions.forEach((submission) => {
submission['s_no'] = index + 1;
index += 1;
});

if (data.previous === null) {
SELF.paginationDetails.isPrev = 'disabled';
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,12 @@ export class ChallengeviewallsubmissionsComponent implements OnInit, AfterViewIn
SELF.paginationDetails.currentPage = Math.ceil(data.next.split('page=')[1] - 1);
}

let index = (SELF.paginationDetails.currentPage-1)*10;
SELF.submissions.forEach((submission) => {
submission['s_no'] = index + 1;
index += 1;
});

if (data.previous === null) {
SELF.paginationDetails.isPrev = 'disabled';
} else {
Expand Down

0 comments on commit 64c9cec

Please sign in to comment.