Add state to table filter button

Description

This is a follow-up ticket to OLMIS-2656, which specified this functionality originally, but scope was cut to finish the implementation. See the mockups (with the funnel icon and count of filters) in that ticket.

The table filter control needs state, so that a user can tell if their view is being actively filtered.

Acceptance Criteria

  • Filter button has an "active" state if any of the filters in the table have a value

  • Filter button has a number in the button text indicating the number of filters with a value

    • This should be the number of form fields with a non-null ng-model value

  • Filter button has a "filter icon"

    • Icon is implemented with CSS only

  • Filter shouldn't save changes after user clicks cancel on filter form

    • ie I open filter form, change "color" option from "blue" to "gold," then click cancel — when I re-open filter it should have the "color" option be "blue."

  • Investigate if the current event implementation can be rewritten to use formController for gathering ngModel values instead of expensive DOM operations and implement it if possible.

Attachments

5
  • 23 Mar 2018, 12:23 PM
  • 23 Mar 2018, 12:08 PM
  • 23 Mar 2018, 12:08 PM
  • 23 Mar 2018, 12:02 PM
  • 23 Mar 2018, 11:53 AM

QAlity Plus - Test Management

Checklists

Activity

Show:

Joanna BebakMarch 23, 2018 at 1:54 PM

I checked, and the issue with the button's color no longer occurs. All others are not related directly with this ticket, and will be fixed in others.

Klaudia PałkowskaMarch 23, 2018 at 1:29 PM
Edited

Those issues with "Requesting Facility" are not related with this ticket. Also, the console error on the CCE Inventory will be fixed in the separate ticket OLMIS-4392. Here is the ticket about the console log on the Requisition > Convert to Order and View Requisitions: OLMIS-4393.

I pushed fix for the button's color.

Joanna BebakMarch 23, 2018 at 12:45 PM

I finished testing. Those are all issues that I found. Sorry for such chaotic (several comments and edits) feedback but I wanted to give it to you as soon as I noticed something.

Joanna BebakMarch 23, 2018 at 12:23 PM
Edited

It seems like it's an issue only with the filter on the CCE Inventory screen. Most likely, it doesn't refresh often enough/fast enough. I checked now also on Firefox, and in most cases, I still have to click the "Search" button twice before the number on the "Filter" button updates. Also, after I clear the selection that I made and click the "Search" button, the number disappears but the button is still blue:

Also, the filter stays blue even after clearing all selections and clicking "Search" on the Stock Management > Adjustments, Issue and Receive screens.

Klaudia PałkowskaMarch 23, 2018 at 12:09 PM

I don't have any problems with clicking the number after clicking the button, that's weird. The button's color should be blue if any filter is selected - it means that it has active state, otherwise gray.

Flagged
Done
Pinned fields
Click on the next to a field label to start pinning.

Details

Assignee

Reporter

Story Points

Original estimate

Time tracking

4d 5h 30m logged

Components

Sprint

Priority

Time Assistant

Created December 6, 2017 at 7:04 PM
Updated November 29, 2020 at 11:36 AM
Resolved March 23, 2018 at 1:54 PM