nss-evening-cohort-11 / nutshell-ewoks-droids

Star Destroyer
0 stars 2 forks source link

Mission Planetary Sector - Update #128

Open stephencastaneda opened 4 years ago

stephencastaneda commented 4 years ago

User Story

As a user, I should be able to edit the planetary sector for a mission.

AC

WHEN the mission page loads THEN each mission should have an edit button AND when I click that edit button a modal should pop up AND the modal should have a dropdown menu of planetary sectors AND I should be able to change the planetary sector AND I should be able to change the planetary sector

Dev Notes

125

Step 1 Create a file in the data folder called missionPlaneterySectorData.js import axios and apiKeys at the top of the file create a function called getAllPlanetarySectors getAllPlanetarySectors makes an axios.get call to /planetarySectorId.json

Step 2 *go the printMissions function in theGalaxy and add a <select> tag with an id of sector-btn to the bottom of the domString

Step 3 *go the updateMission function and add $(#sector-btn).val() to get the value of the button for the planetarySector