Shereen_Created Routing and controller function for Add Tool#970
Conversation
Created Routing and controller function for Add Tool request.
There was a problem hiding this comment.
A few changes need to be made.
Added comments and images on the front-end PR OneCommunityGlobal/HighestGoodNetworkApp#2306 (review)
Sandhya1236
left a comment
There was a problem hiding this comment.
I have successfully tested the updated Add Tool component, which now includes an API call to pass form data to the backend, form validation, and updates to store the data in the Redux store. This frontend PR, related to backend PR #970, was tested by checking out the current branch, running npm install, and starting the backend from the dev branch. Navigating to http://localhost:3000/BMdashboard/tools/add and logging in if prompted, I entered data into the form and verified that clicking the submit button saved all form data successfully. Additionally, if the tool name already existed in the database, the appropriate error message, 'Oops!! Tool already exists!', was displayed, confirming that all functionalities worked as expected.
HGN.APP.-.Google.Chrome.2024-05-31.19-45-33.mp4
jinxyou
left a comment
There was a problem hiding this comment.
I left a review at OneCommunityGlobal/HighestGoodNetworkApp#2306 (review)
| link: String, | ||
|
|
||
| // isPowered: { type: Boolean, required: true }, | ||
| // powerSource: { type: String, required: () => this.isPowered }, // required if isPowered = true (syntax?) |
There was a problem hiding this comment.
Hi Shereen,
Can we get rid of comments on line 77 & 78 if they do not serve any useful purpose?
| requestor: { requestorId }, | ||
| } = req.body; | ||
|
|
||
| try { |
There was a problem hiding this comment.
I believe we do not need try-catch block as all the code that is present within the try catch block is using .then() and .catch().
Parth-tech
left a comment
There was a problem hiding this comment.
Hey Shereen,
The backend looks good to me. But I have requested changes of the front-end so I will approve the backend once the front-end is ready to be approved.
DiyaWadhwani
left a comment
There was a problem hiding this comment.
Hi Shereen,
I have dropped a comment on your frontend PR and requested a few UI changes.
Kindly review them
OneCommunityGlobal/HighestGoodNetworkApp#2306 (review)
Thank you.
jinxyou
left a comment
There was a problem hiding this comment.
I approved the PR in frontend at OneCommunityGlobal/HighestGoodNetworkApp#2306 (review)
nikhilpittala16
left a comment
There was a problem hiding this comment.
I have tested the PR and left a review on the front-end. link can be found here:OneCommunityGlobal/HighestGoodNetworkApp#2306 (review)
Parth-tech
left a comment
There was a problem hiding this comment.
Hey Sheeren,
Great job done. I have left a review on the front-end, review link.
Kavil-Jain-514
left a comment
There was a problem hiding this comment.
All the fields are working fine, but there is one change.
When the user selects Rental for the Purchase/Rental field and again changes the dropdown to purchase, then while submitting the form, the Return date says required as technically it should not show that error message.
Please take a look at the video below for reference.
PR.2306-970.mp4
Addressed |
Addressed |
Addressed |
Addressed |
|
Thank you all, merging! |

Created Routing and controller function for Add Tool request.
Description
Created Routing and controller function for Add Tool request.
Implements # (WBS) : 4.5.8
Related PRS (if any):
This frontend PR is related to the #XXX backend PR.
To test this backend PR you need to checkout the #2306 frontend PR.
How to test:
npm installand...to run this PR locally