Skip to content
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

Make 'Clear All' button work on order cycle page #2821

Merged
merged 1 commit into from
Oct 9, 2018

Conversation

nikobozi
Copy link
Contributor

@nikobozi nikobozi commented Oct 4, 2018

What? Why?

Closes #2362
The expected functionality (clearing filters) didn't work because there was no corresponding function in the controller.

What should we test?

  • Navigate to /admin/order_cycles
  • Apply some filters
  • Click on 'Clear all'
    The filters should be reset to initial state

Release notes

Make 'Clear All' button work on admin order cycles page

$scope.scheduleFilter = 0
$scope.involvingFilter = 0
$scope.query = ''
$scope.resetSelectFilters()
Copy link
Contributor

Choose a reason for hiding this comment

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

sorry @nikobozi, I'm not very angular-savy. When does this get executed? can you explain a bit?

Copy link
Contributor

Choose a reason for hiding this comment

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

it's when the controller is loaded @sauloperez

Copy link
Contributor Author

@nikobozi nikobozi Oct 4, 2018

Choose a reason for hiding this comment

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

yes, and it can then be triggered via a ng-click directive from a DOM element, which in this case is the input button in this template views/admin/order_cycles/_filters.html.haml

Copy link
Contributor

Choose a reason for hiding this comment

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

Great! thanks both!

@sauloperez
Copy link
Contributor

sauloperez commented Oct 4, 2018

Hi @nikobozi ! Welcome! Very happy to have your help with it.

If you have any questions setting up the dev env, with Github, etc. feel free to ask on the dev channel of our Slack team.

Copy link
Contributor

@luisramos0 luisramos0 left a comment

Choose a reason for hiding this comment

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

@nikobozi welcome to OFN!

$scope.scheduleFilter = 0
$scope.involvingFilter = 0
$scope.query = ''
$scope.resetSelectFilters()
Copy link
Contributor

Choose a reason for hiding this comment

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

it's when the controller is loaded @sauloperez

@sauloperez
Copy link
Contributor

Staged on https://staging.katuma.org

@RachL RachL self-assigned this Oct 9, 2018
@RachL
Copy link
Contributor

RachL commented Oct 9, 2018

Everything looks good ! Good job and welcome @nikobozi !
Testing notes:

https://docs.google.com/document/d/1Gw7Zy3xJsMboJRnTZinQ5OBJBxp_HqvD1DCI7KQqOdY/edit#

@RachL RachL removed the pr-staged-es label Oct 9, 2018
@sauloperez sauloperez merged commit 8596215 into openfoodfoundation:master Oct 9, 2018
@sauloperez
Copy link
Contributor

sauloperez commented Oct 9, 2018

Congrats @nikobozi and thanks again!

@nikobozi
Copy link
Contributor Author

nikobozi commented Oct 9, 2018

thanks :)

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.

4 participants