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

Merge "État", "CMM", "SS", "MIN", and "MAX" columns into a single <meter> column in stock inventories registry #7588

Open
jniles opened this issue May 21, 2024 · 0 comments

Comments

@jniles
Copy link
Collaborator

jniles commented May 21, 2024

The default view of the stock inventories page shows five columns of information about the level of the stock in the inventory. These are: "État" (state), "CMM" (average monthly consumption), "SS" (security stock), "MIN" (minimum stock), and "MAX" (maximum stock). See below:

image

I propose hiding the CMM, SS, MIN, and MAX columns by default (they could be made visible using the "columns" menu), and replacing the "État" column's contents with a <meter> element that would show the level of the stock at a glance. Here is an example proposal (ignore the labels, they would not be part of the column, but are there to describe the stock state).

image

The code to create this is quite simple:

<meter min="0" max="100" low="33" high="66" optimum="80" value="50"></meter>

You can read more about the <meter> element here: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/meter

The following states would be supported:

  1. Stock Out -> Empty Meter (can we add a red outline?)
  2. Unused Stock -> Empty Meter
  3. Below Security Stock -> Red meter.
  4. Below Minimum Stock -> Yellow Meter.
  5. Sufficient stock -> Green Meter.
  6. Overmaximum -> Full meter .. if possible to style this, make it blue. Otherwise, green as default.

Sorting by this column would sort by the amount of stock left relative to the maximum stock. This would behave like the percentage (${quantity in stock}/${maximum stock}%).

We could include a tooltip to explain the calculation of the value at a glance.

In my mind, the advantages are:

  1. Quickly identify problem stock without needing to read the text in the label, which can often be difficult to read.
  2. Allows for relative comparison of items (assuming we implement the sorting feature proposed above). If a user is trying to figure out which stock level is at the lowest relative to its consumption rate, they can easily sort this column to reveal it.
  3. Allow users to quickly assess the levels of stock without needing to worry about the units of the stock.
  4. Make the interface look pretty!
  5. Removing columns in the default view gives more room for other elements.

The disadvantage is that it hides information from the user, however if we just move these into the default hidden state, users can bring back the numbers of they need them.

Thoughts?

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

No branches or pull requests

1 participant