As a user, I should be able to delete personnel from a mission I created
AC
WHEN I see a single mission
THEN there should be a way to delete personnel from the mission
THEN the personnel data should be removed from the database
AND the page should update and reflect those changes
DEV NOTES
[ ] edit the singlePersonnelMissionCard function to include a delete button
[ ] give it an id using a template literal id="${personnel.personnelMissionId}"
[ ] attach an event listener to the buttons in singleViewMissionPersonnel
[ ] event listener should call a function that lives in singleViewMissionPersonnel file.
USER STORY
As a user, I should be able to delete personnel from a mission I created
AC
WHEN I see a single mission THEN there should be a way to delete personnel from the mission THEN the personnel data should be removed from the database AND the page should update and reflect those changes
DEV NOTES
singlePersonnelMissionCard
function to include a delete buttonid="${personnel.personnelMissionId}"
singleViewMissionPersonnel
singleViewMissionPersonnel
file.removePersonnelFromMission
removePersonnelFromMission
callsdeletePersonnelFromMission
.then()
and.catch()
.catch()
as usual withconsole.error()
.then()
reprints single view or kicks you out to full mission viewdeletePersonnelFromMission
function inpersonnelMissionData.js
fileaxios.delete()
method to remove the entry from the database