nss-evening-cohort-10 / nutshell-nautilus-explorer

0 stars 0 forks source link

Crew Update #19

Closed CharityBunyon closed 4 years ago

CharityBunyon commented 5 years ago

User Story

As a user, I should be able to edit my crew members.

AC

WHEN the user logs in they should she all crew members AND when the user clicks the edit link THEN a modal pops open with a form pre-filled with the crew member details which they can edit and save

Dev Notes

  1. In the crewBoard component

    • [x] The delete link will have the following classes: .editCrew & .hide
    • [x] Update auth.js to remove hide from the delete link on authentication & update logout function to add class hide back
    • [x] In the buildCrew function add an event listener that targets the crew div and on click if the target id(editCrew) then call the
    • [x] Use e.target.closest('.crewCard').attr('id') to get the boardId
    • [x] Pull object making the boardId from crew.json
    • [x] Reuse add crew modal for edit crew details with save button hidden and update button displayed
    • [ ] Pre-fill form inputs with exiting crew member details by using ${formItemId}.val(crew.key) format
    • [x] Add click event listener to update button that calls saveCrewMember
  2. In crewData