nss-evening-cohort-10 / nutshell-star-destroyer

0 stars 1 forks source link

Planetary System Mission: Update #83

Open ConnorSullivan10 opened 4 years ago

ConnorSullivan10 commented 4 years ago

User Story

As a user, I should be able to edit a Mission Planetary System.

AC

GIVEN the user is on the Missions page AND they click the "Edit" button THEN they should be able to update the Planetary System to the selected Mission by entering it into input form of the modal that pops up on click of the "Edit" button

See #72

Dev Notes

<select class="browser-default custom-select">
  <option selected value="${planetSystem.id}">${planetSystem.name}</option>
</select>
const buildDropdownSelection = () => new Promise((resolve, reject) => {
  let bigBoardString = '';
smash.getAllPlanetarySystemById(mission.planetaryID);
    .then((planetSystem) => {
      planets.forEach((planetSystem) => {
        bigBoardString += `<option value="${planetSystem.id}">${planetSystem.name}</option>`;
      });
      resolve(bigBoardString);
    })
    .catch((error) => reject(error));
});
 buildDropdownSelection()
    .then((resolve) => {
      boardSelections = resolve;
    });

<select class="browser-default custom-select">
  <option selected value="${planetSystem.id}">${planetSystem.name}</option>${boardSelections}
</select>