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

Star Destroyer
0 stars 2 forks source link

Mission Enemy Target - Update #129

Open stephencastaneda opened 4 years ago

stephencastaneda commented 4 years ago

User Story

As a user, I should be able to edit the enemy target 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 enemy targets AND I should be able to change the enemy target AND the enemy target should update in firebase

Dev Notes

125

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

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

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