Skip to content

Changing the URL user id number in admin accounting table now refresh the table#509

Merged
stefanoborini merged 12 commits into
masterfrom
fix-accounting-user-id-issue
Jun 19, 2017
Merged

Changing the URL user id number in admin accounting table now refresh the table#509
stefanoborini merged 12 commits into
masterfrom
fix-accounting-user-id-issue

Conversation

@martinRenou

@martinRenou martinRenou commented Jun 6, 2017

Copy link
Copy Markdown
Member

The Vue component now listens to changes of id and update the table.

Closes #441

@codecov-io

codecov-io commented Jun 6, 2017

Copy link
Copy Markdown

Codecov Report

Merging #509 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #509   +/-   ##
=======================================
  Coverage   95.25%   95.25%           
=======================================
  Files          88       88           
  Lines        3960     3960           
  Branches      248      248           
=======================================
  Hits         3772     3772           
  Misses        137      137           
  Partials       51       51

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e2e9ae...9785cb0. Read the comment docs.

@martinRenou martinRenou requested a review from stefanoborini June 6, 2017 10:01
@stefanoborini

Copy link
Copy Markdown
Contributor

Write some selenium test.

@stefanoborini stefanoborini left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

needs some selenium tests.

When changing the url from an existing id "id1" to an unexisting id "id2", an issue is displayed but the table of the id "id1" is still displayed. In order to fix that we have to empty the table before trying to retrieve informations about the new id, so that if the new id is unknown, the table is empty as expected.
},

watch: {
'$route.params.id': function() {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

clearTable();
updateTable();

this.table.rows = [];
resources.Accounting.items({filter: JSON.stringify({user_id: this.$route.params.id })})
.done((identifiers, items) => {
this.table.rows = [];

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

leave it here.

@stefanoborini stefanoborini merged commit e90774d into master Jun 19, 2017
@stefanoborini stefanoborini deleted the fix-accounting-user-id-issue branch June 19, 2017 10:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants