Skip to content

Juhitha - Cleanup the inventory types page#3833

Merged
one-community merged 6 commits intodevelopmentfrom
Cleanup/shuhua-inventory-types-page
Apr 6, 2026
Merged

Juhitha - Cleanup the inventory types page#3833
one-community merged 6 commits intodevelopmentfrom
Cleanup/shuhua-inventory-types-page

Conversation

@Juhitha-Reddy
Copy link
Copy Markdown
Contributor

@Juhitha-Reddy Juhitha-Reddy commented Aug 2, 2025

Description

Cleanup and refinement of the All Inventory Types page functionality, building upon the work done in PR #3540. This PR addresses remaining issues and improves the implementation of inventory type management features originally developed by Shuhua and later updated by Rahul.
Fixes critical import path issues, API endpoint configuration, and ensures robust communication with the backend inventory management system.

Related PRS (if any):

This frontend PR is related to the #765 backend PR.
To test this frontend PR you need to checkout the #765 backend PR.

Main changes explained:

  • Updated all the inventory tables to implement APIs to each
  • Implemented edit functionality for all the tables
  • Fixed issues with existing issues with add/edit/delete functionalities for all inventory types
  • Fixed import path issues in TypesTable.jsx and TypeRow.jsx - changed from absolute to relative paths
  • Integrated inventory APIs with proper error handling and toast notifications

How to test:

  1. Check into current branch Cleanup/shuhua-inventory-types-page
  2. Do npm install && npm run start:local to run this PR locally
  3. Ensure backend is running.
  4. Clear site data/cache
  5. Go to dashboard → Building Management → Inventory Types(/bmdashboard/inventorytypes)
  6. Verify all inventory type operations work:
  7. View different inventory categories (Materials, Tools, Equipment, etc.)
  8. Add new inventory types
  9. Edit existing inventory types
  10. Delete inventory types
  11. Verify this feature works in dark mode

NOTE: Please make sure you pointing to local api endpoints (http://localhost:4500/api) by updating in the .env file this application.

Screenshots or videos of changes:

Screen.Recording.2025-07-26.at.7.58.15.AM.mov

@netlify
Copy link
Copy Markdown

netlify bot commented Aug 2, 2025

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit 06205c5
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/688e0b3895cdea0008997fe9
😎 Deploy Preview https://deploy-preview-3833--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@Rishitha1810
Copy link
Copy Markdown

Worked on verifying all inventory type operations including viewing different inventory categories (Materials, Tools, Equipment, etc.), adding new inventory types, editing existing ones, and deleting them. While most functionalities worked as expected, it was noted that the dark mode UI and the delete buttons are currently not functioning properly and need further attention.
Screenshot 2025-08-02 at 10 51 36 AM
Screenshot 2025-08-02 at 10 54 01 AM
Screenshot 2025-08-02 at 10 58 27 AM
Screenshot 2025-08-02 at 10 58 47 AM

Copy link
Copy Markdown
Contributor

@Namitha7070 Namitha7070 left a comment

Choose a reason for hiding this comment

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

Tested this PR. The add feature for all fields(materials, consumables, equipments, etc) are working fine but the edit and delete features are not getting updated.

Untitled.video.-.Made.with.Clipchamp.2.mp4

Copy link
Copy Markdown
Contributor

@shashankm9 shashankm9 left a comment

Choose a reason for hiding this comment

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

I have tested this PR. Add feature is working in all the Inventory Types But Edit and delete functions are not works in any of those and dark mode is not working at all. Inventory Types are not legible when curious is hovering on then, change the text color to white maybe.

PR.3833.mp4

@Juhitha-Reddy Juhitha-Reddy changed the title Cleanup/shuhua inventory types page Cleanup/Juhitha inventory types page Aug 4, 2025
@Juhitha-Reddy
Copy link
Copy Markdown
Contributor Author

@Rishitha1810 , @shashankm9, @Namitha7070 , I verified the PR in my local and the add, edit and delete functionalities are working as expected. Could you please check if you have updated the api endpoint to local while testing and please let me know if the issue still persists.

@one-community one-community added the High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible label Dec 19, 2025
@one-community one-community changed the title Cleanup/Juhitha inventory types page Juhitha - Cleanup the inventory types page Dec 19, 2025
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Juhitha,

I have reviewed your PR locally and all the functionality works as expected but as mentioned by you i do not see dark mode implemented for the page.

3833.mp4

@netlify
Copy link
Copy Markdown

netlify bot commented Jan 4, 2026

Deploy Preview for highestgoodnetwork-dev ready!

Name Link
🔨 Latest commit f615266
🔍 Latest deploy log https://app.netlify.com/projects/highestgoodnetwork-dev/deploys/69d2f0c2f16c0700088612f6
😎 Deploy Preview https://deploy-preview-3833--highestgoodnetwork-dev.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Jan 4, 2026

Anusha-Gali
Anusha-Gali previously approved these changes Jan 13, 2026
Copy link
Copy Markdown

@Anusha-Gali Anusha-Gali left a comment

Choose a reason for hiding this comment

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

Hi Juhitha,

Thanks for updating and working on the issue. I have reviewed your PR locally and the dark mode works as per requirement.
Screenshot 2026-01-12 at 8 43 26 PM
Screenshot 2026-01-12 at 9 01 51 PM
Screenshot 2026-01-12 at 9 02 40 PM
Screenshot 2026-01-12 at 9 03 06 PM

naznin07
naznin07 previously approved these changes Mar 19, 2026
Copy link
Copy Markdown

@naznin07 naznin07 left a comment

Choose a reason for hiding this comment

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

Dispatch in a connected statement.

PR # 3833

- Resolve merge conflicts in 6 frontend files (TypeRow, TypesTable,
  invUnitsTable, InventoryTypesList, inventoryTypeConstants, TypesList.module.css)
  keeping inline edit/add approach with relative imports
- Add backend route /invtypes/:type/:invtypeId for PUT and DELETE to match
  frontend URL pattern (fixes "Cannot DELETE/PUT" errors)
- Fix Mongoose discriminator issue in updateInventoryType and updateNameAndUnit:
  resolve correct subtype model before updating so discriminator-specific
  fields like unit and fuelType are no longer silently dropped
- Add requestor.requestorId from Redux auth state in addInvType action to
  prevent backend destructuring crash on add operations
- Add Equipment field mapping (desc for description) in addInvType action
- Add addReusableType backend controller and POST /invtypes/reusables route
- Add deleteInventoryType export to invTypeActions for DeleteInvTypeModal
- Merge dark mode styles from both branches in TypesList.module.css

Made-with: Cursor
@Juhitha-Reddy Juhitha-Reddy dismissed stale reviews from naznin07 and Anusha-Gali via f615266 April 5, 2026 23:31
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 5, 2026

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit 5177ff1 into development Apr 6, 2026
10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

High Priority - Please Review First This is an important PR we'd like to get merged as soon as possible

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants