-
Notifications
You must be signed in to change notification settings - Fork 30
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
Aishwarya_Purchase-Tool-Request-Form-Backend #670
Aishwarya_Purchase-Tool-Request-Form-Backend #670
Conversation
Aish_Purchase-Tool-Request-Form-(Backend)
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.
I left a comment on the fe #1752.
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.
LGTM.
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.
Please fix the merge conflicts. Also, Olga added new Tool router and controller files in her Tool Details branch. Can you merge your code into those files?
I have made the suggested changes in both frontend and backend files. Files are now synced with the current dev branch. Can you check? |
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 @Aishwaryak01, see my review please:OneCommunityGlobal/HighestGoodNetworkApp#1752
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.
I tested this backend with the corresponding frontend pr and everything works as expected. I was able to submit a tool purchase request successfully.
See comment on front end pr: OneCommunityGlobal/HighestGoodNetworkApp#1752 (comment) |
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.
The functionality in this PR work as intended. I have left a review on the frontend PR
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.
More detailed review on PR1752. I reviewed this code and found that it works perfectly. Good work!
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.
Hello, tested this PR using the front end branch 1752 and this PR works as expected.
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.
I tested this backend with the corresponding frontend pr and everything works as expected.
Thank you all, merging! |
left review in the frontend, good job! |
Aish_Purchase-Tool-Request-Form-(Backend)
Description
This pull request adds the backend logic for the Purchase Request: Tool form in the BM Dashboard (Phase 2).
Related PRS (if any):
This PR must be checked out to test #1752 frontend PR
Main changes explained:
Add BM Dashboard collections to the dev database: buildingTool
Add Mongoose schema file buildingTool
Add POST route to either create a new document in buildingTool collection (if the tool is being ordered to the project for the first time), or update purchase record sub-document in an existing document (if the material has been ordered previously for the project). In either case, the purchaseRecord sub-document will have default values added to date, requestedBy, and status fields, in addition to the submitted form data.
How to test:
git checkout Aish_Purchase-Tool-Request-Form-(Backend)
npm install
npm run dev
check the related frontend PR for further instructions
Optional: connect to the dev db via Mongo Compass, open the buildingTool collection, and observe that documents and sub-documents are being updated correctly.
Notes
Please remember to either Approve or Request Changes. Do not just leave a comment.
Please leave a review for both the front and backend branches after you have finished testing!