Skip to content

Juhitha took over for Jiayu & Shuhua - All Inventory Types page functionalities#765

Merged
one-community merged 22 commits intodevelopmentfrom
Shuhua-Types_List_Page_Edit_Delete
Apr 6, 2026
Merged

Juhitha took over for Jiayu & Shuhua - All Inventory Types page functionalities#765
one-community merged 22 commits intodevelopmentfrom
Shuhua-Types_List_Page_Edit_Delete

Conversation

@Shuhua-L
Copy link
Copy Markdown
Contributor

@Shuhua-L Shuhua-L commented Feb 23, 2024

Description

Implement the functionalities of the All Inventory Types page, which the UI was implemented in this PR

Related PRS (if any):

To test this backend PR you need to checkout the #3833 frontend PR.

Main changes explained:

  • Added missing PUT routes for updating inventory types (Reusables, Equipments, Consumables, Tools)
  • Added missing DELETE routes for removing inventory types across all categories
  • Fixed POST route for Reusables inventory type (was completely missing)
  • Added missing POST/DELETE routes for inventory units management
  • Updated bmInventoryTypeRouter.js with comprehensive CRUD operations for all inventory types
  • Integrated controller methods for updateSingleInvType, deleteSingleInvType, addInvUnit, deleteInvUnit

How to test:

  1. Check into current branch Shuhua-Types_List_Page_Edit_Delete
  2. Do npm install && npm start to run this PR locally on port 4500
  3. Checkout the frontend cleanup branch
  4. Verify all inventory type operations work:
  • GET: Fetch Materials, Consumables, Tools, Equipment, Reusables
  • POST: Add new inventory types for all categories
  • PUT: Update existing inventory types
  • DELETE: Remove inventory types

@skaush21
Copy link
Copy Markdown
Contributor

left comment on frontend PR #1984

Copy link
Copy Markdown

@brandta-1 brandta-1 left a comment

Choose a reason for hiding this comment

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

Review

Refer to front end review.

Copy link
Copy Markdown
Contributor

@skaush21 skaush21 left a comment

Choose a reason for hiding this comment

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

comment on frontend PR 1984

@XiaohanMeng XiaohanMeng self-requested a review February 27, 2024 19:39
Copy link
Copy Markdown
Contributor

@XiaohanMeng XiaohanMeng left a comment

Choose a reason for hiding this comment

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

Hi, I left my comment on FE project: OneCommunityGlobal/HighestGoodNetworkApp#1984 (review)

Copy link
Copy Markdown

@ShengjieMao ShengjieMao left a comment

Choose a reason for hiding this comment

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

Left review in frontend pr

Copy link
Copy Markdown
Contributor

@20chen-7 20chen-7 left a comment

Choose a reason for hiding this comment

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

Good job! The add/delete works as described.
Screenshot 2024-03-15 at 8 54 18 PM

Screenshot 2024-03-15 at 8 55 14 PM Screenshot 2024-03-15 at 8 56 03 PM Screenshot 2024-03-15 at 8 56 13 PM

But I strongly recommend add back to previous btn here.

Everything is wonderful!
Screenshot 2024-03-15 at 8 56 40 PM
Screenshot 2024-03-15 at 8 56 46 PM
Screenshot 2024-03-15 at 8 57 10 PM
…]()
Screenshot 2024-03-15 at 8 57 38 PM
Screenshot 2024-03-15 at 8 57 43 PM

Copy link
Copy Markdown

@yvonnep165 yvonnep165 left a comment

Choose a reason for hiding this comment

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

Hi @Shuhua-L , I tested this PR with the frontend PR 1984 and everything worked as intended. I left a comment in the frontend PR.

@one-community one-community added Do Not Review Do not review or look at code without full context Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it. labels May 12, 2024
@peter6866 peter6866 removed Do Not Review Do not review or look at code without full context Needs New Developer This is a PR that is partially developed but needs someone new to take it over and finish it. labels Jun 16, 2024
@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 Jul 1, 2024
Copy link
Copy Markdown
Contributor

@kabraambika kabraambika 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 provided comment in frontend PR #1984

Copy link
Copy Markdown

@varunreddy03 varunreddy03 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 provided my comments in the related frontend PR #1984.

Copy link
Copy Markdown

@adityasure9 adityasure9 left a comment

Choose a reason for hiding this comment

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

Hi @Shuhua-L,

I tested the PR according to the instructions, and I encountered the following issues:

After editing and saving changes on the Inventory Types page, the entire page becomes unresponsive and gets stuck. This issue prevents further interaction with the page, making it difficult to proceed with other actions like adding or deleting items.
I noticed similar errors as mentioned by other reviewers, particularly related to the frontend not loading properly due to compile-time errors.
Given these issues, it seems there are some bugs that need to be addressed before this can be merged. Please let me know if you need any further details or testing on my end.

1.mp4

Thanks for your efforts on this!

@one-community one-community changed the title Shuhua - All Inventory Types page functionalities Jiayu took over for Shuhua - All Inventory Types page functionalities Aug 11, 2024
@honglinchen0524
Copy link
Copy Markdown

Hi! I've added my comment on the frontend PR #1984, great work!

@jeyanthi-sm
Copy link
Copy Markdown
Contributor

Copy link
Copy Markdown

@SSP24SCM16G SSP24SCM16G left a comment

Choose a reason for hiding this comment

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

Copy link
Copy Markdown

@rohith1667 rohith1667 left a comment

Choose a reason for hiding this comment

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

Reviewed frontend pr 1984 all the changes are implemented. all the features are working as mentioned.

Screen.Recording.2025-03-01.at.6.06.02.PM.mov

Copy link
Copy Markdown

@HSP24SCM69K HSP24SCM69K left a comment

Choose a reason for hiding this comment

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

Reviewed Frontend PR #1984 – All requested changes have been successfully implemented, and all features are functioning as expected.
Screenshot 2025-03-08 at 13 37 55
Screenshot 2025-03-08 at 13 38 05
Screenshot 2025-03-08 at 13 38 45
Screenshot 2025-03-08 at 13 38 48
Screenshot 2025-03-08 at 13 39 04
Screenshot 2025-03-08 at 13 39 27
Screenshot 2025-03-08 at 13 39 33

Copy link
Copy Markdown
Contributor

@rishwa344 rishwa344 left a comment

Choose a reason for hiding this comment

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

I reviewed this PR and verified that adding, editing, and deleting inventory types are working as expected. However, after editing an inventory type, the page becomes unresponsive and throws a console error. The issue resolves only after refreshing the page. Other functionalities, including adding and deleting inventory units, are working fine.
Screenshot 2025-03-10 at 1 18 41 PM
Screenshot 2025-03-10 at 1 19 33 PM

@sriramsme
Copy link
Copy Markdown
Contributor

sriramsme commented Mar 12, 2025

#everyone please re-review this PR. Updates were made on frontend.

@humemah
Copy link
Copy Markdown
Contributor

humemah commented Mar 29, 2025

Followed the steps and verified that the API handles inventory updates, unit management, responses, and error messages correctly.
image
image
image

@Juhitha-Reddy Juhitha-Reddy force-pushed the Shuhua-Types_List_Page_Edit_Delete branch from 04517a6 to dec2460 Compare August 2, 2025 03:53
@Juhitha-Reddy Juhitha-Reddy self-assigned this Aug 2, 2025
@one-community one-community changed the title Jiayu took over for Shuhua - All Inventory Types page functionalities Juhitha took over for Jiayu & Shuhua - All Inventory Types page functionalities Dec 19, 2025
@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 22, 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 have mentioned my comments in the frontend PR: OneCommunityGlobal/HighestGoodNetworkApp#3833 (review)

… and reusable type endpoint

- Add /invtypes/:type/:invtypeId route for PUT and DELETE to match frontend URL
- Fix Mongoose discriminator issue: resolve correct subtype model (MatType,
  ConsType, etc.) in updateInventoryType and updateNameAndUnit so fields like
  unit and fuelType are no longer silently dropped by the base model
- Add addReusableType controller and POST /invtypes/reusables route
- Add addInventoryUnit and deleteInventoryUnit controller functions and routes

Made-with: Cursor
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud bot commented Apr 6, 2026

@one-community
Copy link
Copy Markdown
Member

Thank you all, merging!

@one-community one-community merged commit d182cad into development Apr 6, 2026
3 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.