Adithya resolve ItemsTable crash and re-apply Consumables table usability features#5288
Open
adithya-6101 wants to merge 2 commits into
Open
Adithya resolve ItemsTable crash and re-apply Consumables table usability features#5288adithya-6101 wants to merge 2 commits into
adithya-6101 wants to merge 2 commits into
Conversation
✅ Deploy Preview for highestgoodnetwork-dev ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
DeepighaJ
requested changes
May 28, 2026
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
This PR resolves a critical
ReferenceError: itemType is not definedcrash currently affecting thedevelopmentbranch's Consumables dashboard.Additionally, it re-applies the visual hierarchy, data formatting, and usability enhancements originally introduced in PR #4828, which were overwritten during a recent pagination refactor. All visual enhancements have been carefully integrated to work seamlessly alongside the newly added search, sorting, and pagination logic.
This PR implements:
itemTypeprop in the table component to stop the React Error Boundary crash on the live dev site.Availablestock drops below a threshold (< 10).<thead>so column titles remain visible during vertical scrolling, including dark mode support.SelectItem.jsxto use flattened names, allowing the top-right Consumables dropdown to populate correctly instead of showing "No data".onClickhandlers from the "Add Material", "Edit", and "View Update History" buttons in the list view to prevent local errors, replacing them with temporary console logs pending future modal integration.Related PRs (if any):
Main changes explained:
ItemsTable.jsx:itemTypefrom props to fix theReferenceErrorinside the<RecordsModal>call.textAlign: 'right'alignment for numeric columns, and action column tooltips/dividers into the new mapping logic created by the recent pagination refactor.ItemListView.jsx:itemTypeprop down to<ItemsTable>to ensure the modal functions correctly.toggleUpdateHistoryModalreferences that were causing local crashes on click.SelectItem.jsx:else if (label === 'Consumables')branch to correctly map unique consumable names to the dropdown filter instead of defaulting to "No data".ItemListView.module.css:.darkTable .stickyThead th) to ensure the newly restored sticky header has the correct background color and borders in dark mode.How to test:
npm installandnpm startto run this PR locally.http://localhost:5173/bmdashboard/consumablesdevelopment.Screenshots or videos of changes:
Note:
The low stock threshold is currently hardcoded to
< 10for testing and immediate visual feedback.