New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes#1148 : Added Pagination in My Badges #1151

Merged
merged 1 commit into from Jun 30, 2018

Conversation

2 participants
@ParthS007
Copy link
Member

ParthS007 commented Jun 30, 2018

Fixes #1148

Checklist

  • I have read the Contribution & Best practices Guide and my PR follows them.
  • My branch is up-to-date with the Upstream development branch.
  • I have added necessary documentation (if appropriate)

Changes proposed in this pull request:

  • Added Pagination in My Badges
  • Made the UI similar to Admin Dashboard.

image

actions : {
nextPage() {
if (this.page > 1) {
this.page + 1;

This comment has been minimized.

@yashLadha

yashLadha Jun 30, 2018

Member

This is not assigned to anyone?

nextPage() {
if (this.page > 1) {
this.page + 1;
this.get('store').query('my-badges')

This comment has been minimized.

@yashLadha

yashLadha Jun 30, 2018

Member

Page query param is not passed

},
prevPage() {
if (this.page - 1 > 0) {
this.page - 1;

This comment has been minimized.

@yashLadha

yashLadha Jun 30, 2018

Member

Similar as above

@yashLadha
Copy link
Member

yashLadha left a comment

PTAL

let filter = {};
if (this.page > 1) {
filter.page = this.page + 1;
this.get('store').query('my-badges', 'all')

This comment has been minimized.

@yashLadha

yashLadha Jun 30, 2018

Member

pass filter in place of all

this.set('page', this.page - 1);
})
.catch(err => {
console.log(err);

This comment has been minimized.

@yashLadha

yashLadha Jun 30, 2018

Member

Notify in case of error

@ParthS007 ParthS007 force-pushed the ParthS007:pagin branch from 90c14d6 to 49f1bb5 Jun 30, 2018

@ParthS007 ParthS007 force-pushed the ParthS007:pagin branch from 7cdba2d to fdea232 Jun 30, 2018

@yashLadha
Copy link
Member

yashLadha left a comment

👍

@open-event-bot open-event-bot bot removed the needs-review label Jun 30, 2018

@yashLadha yashLadha merged commit 20203d2 into fossasia:development Jun 30, 2018

2 checks passed

Codacy/PR Quality Review Up to standards. A positive pull request.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@ParthS007 ParthS007 deleted the ParthS007:pagin branch Jul 1, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment