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

0 stars 1 forks source link

Delete Mission Personnel #86

Open rtate2 opened 4 years ago

rtate2 commented 4 years ago

User Story

As a user, I should be able to delete Mission Personnel.

Acceptance Criteria

GIVEN the user is logged in and visits the Mission page WHEN they select the appropriate mission THEN clicks on the View Details within the Personnel section/card AND the user clicks the Delete button on the personnel card THEN the specific personnel is removed from firebase AND the DOM is updated

Dev Notes

• Create an (removePersonnel) axios.delete call in the helpers/data/missionPersonnelData.js file that allows the user to delete mission personnel from firebase and the DOM

• Create a button that prints to every mission personnel card that will have the ID of the personnel as the ID of the button. This button will only delete the personnel card associated. The button should have an event listener that reads the personnelId from the button, and deletes the individual personnel from firebase.

• The deletePersonnel event listener will call the removePersonnel function to target the data within firebase and delete it.

• Call --- to update the DOM when the delete is successful in the .then of the removePersonnel call

rtate2 commented 4 years ago

Delete Button Mockup Screen Shot 2019-11-26 at 11 35 25 AM