Adithya fix consumables usability#4828
Merged
Merged
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Member
|
Thank you all, merging! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Description
Enhances the usability and visual clarity of the Consumables Dashboard. As the list of consumables grows, it becomes difficult for users to scan and quickly identify critical information like low stock or distinguish action buttons. This PR introduces visual hierarchies, sticky headers, and data formatting to solve these issues. Additionally, it fixes a bug where the Consumables filter dropdown was displaying "No data" and rendering empty "ghost" rows in the table.
This PR implements:
Availablestock drops below a threshold (< 10).<thead>so column titles remain visible during vertical scrolling.projectanditemTypeobjects before passing them to the generic table, eliminating ghost rows and allowing the top-right Consumables dropdown to populate correctly.Related PRS (if any):
This frontend PR utilizes existing backend endpoints. No new backend PR is required as the styling, sorting, and badging logic are handled client-side.
Main changes explained:
ConsumableListView.jsx:itemTypelabel..filter()to strip out incomplete "ghost" rows where the item name is 'N/A'.ItemListView.jsx&SelectItem.jsx:itemTypelabel down to the<SelectItem />component.else if (label === 'Consumables')logic insideSelectItem.jsxto correctly populate the dropdown filter with unique consumable names instead of showing "No data".ItemsTable.jsx:position: 'sticky') to header cells and wrapped the table in a container withmaxHeight: '75vh'andoverflowY: 'auto'.<Badge color="danger">Low</Badge>when thestockAvailablekey is less than 10.textAlign: 'right'to numeric columns and aborderLeftstyle to the "Usage Record" column to group the actions visually. Addedtitleattributes for tooltips.How to test:
adithya_fix_consumables_usability.npm installandnpm startto run this PR locally.http://localhost:5173/bmdashboard/consumablesScreenshots or videos of changes:
Note:
The low stock threshold is currently hardcoded to
< 10for testing and immediate visual feedback.