-
Notifications
You must be signed in to change notification settings - Fork 48
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Gary add materials page #1427
Gary add materials page #1427
Conversation
Don't forget to sanitize the inputs with joi please before the data is sent to the backend. Love the implementation of joi in this. This one is looking really good so far |
I tested your PR and works as intended.
screen-recorder-mon-nov-20-2023-13-46-38.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @GaryB93
I tested the new functions on my local environment. the purchase form works perfectly.
The login url works fine
The management dashboard works fine after login from the previous url
All the drop downs and info show correctly
The form submission works fine
When there is unfilled part in the form, form submission is prohibited
The cancel button will redirect to the previous page.
These main functions works perfectly on my environment.
For the error handling part, I didn't find any 503 code or 404(code edited) after shutdown the backend service. The page will continue to rended and pop up some error messages. Could you check out this issue? Other than this all the function works well, Thank you for you work!
@Changhao3220K thanks for your detailed review! When you tested the error handling did you have the Purchase Request: Materials page open? Looks like the |
Hi @GaryB93 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tdkent Everything works as expected. Code files also look good to me!
@tdkent I know that this PR is already merged, but just found out that there is no category filter added to the list of materials in the dropdown list of the purchase request form. This makes even the tools visible under the materials list |
Description
Adds Purchase Request: Material page and form to the BM Dashboard (Phase 2).
Related PRS (if any):
Backend PR 577 must be running to test this branch.
Main changes explained:
How to test:
git checkout gary_add_materials_page
npm install
npm run start:local
http://localhost:3000/bmdashboard
and enter credentials againhttp://localhost:3000/bmdashboard/materials/purchase
- To test error handling on initial page load, you can deactivate the backend server and reload the page. This will load an error page with code 503.
- You can also change the fetch route in src/actions/bmdashboard/projectActions.js > fetchBMProjects from
axios.get(ENDPOINTS.BM_PROJECTS)
toaxios.get(ENDPOINTS.BM_PROJECTS + 's')
, then reload the page, to force a 404 error.- To test error handling if form submission fails, change the fetch route in src/actions/bmdashboard/materialsActions > purchaseMaterial from
ENDPOINTS.BM_MATERIALS
toENDPOINTS.BM_MATERIALS + "s"
. This should result in an error toast with code 404.Screenshots or videos of changes:
purchase-request-material-demo1.mov
Notes: