Fix post request on FrontEnd
License and Copyright Notice
By submitting this issue or commenting on this issue, or contributing any content to this issue, you certify under the Developer Certificate of Origin that the content you post may be licensed under GPLv3 (for code) or CC-BY-SA 4.0 International (for non-code content).
What is the goal or the problem, and why is it important?
- The goal of this issue is to add javascript that takes all of the user's order information / input on the webpage, packages it in JSON format, and sends that JSON object in a post request to the backend.
How are you going to acheive the goal or solve the problem?
What will be produced as a result of this effort and where will it live on GitLab?
- the FrontEnd is sending api requests correctly to the backend
- the requests are through xmlhttp (not axios)
- should be forked from the ditch-react branch because it's part of the conversion from react to jquery
Give a justification of weight or due date.
This ticket is due at the end of sprint 2, and has a weight of 4, since to complete this, you'll need to:
- Get the input from all of the modifiable HTML div's
- Communicate with whoever is working on the backend ticket (tag here)
- Create JSON object containing all of the student's decisions.
Who will do it, and what will they do?
@thebrainboy123 will be responsible for everything regarding this ticket, but can ask for help with populating the JSON object from anyone else.
What was the outcome?
I have added two functions that help collect data for the post request and have successfully sent that post request to the API so that the backend can process it. we also add ids for buttons in the frontend so that we can easily get the data from the HTML elements for the post request.