Open zoeames opened 4 years ago
As a user, I should be able to delete items on the menu.
WHEN on the crew "page" THEN I should see delete buttons on the crew AND clicking them should remove the crew from firebase
printCrew
delete-crew
deleteCrewEvent
$(body).on('click', '.delete-crew', deleteCrewEvent)
crewData.deleteCrew
axios.delete
console.error('could not delete')
User Story
As a user, I should be able to delete items on the menu.
AC
WHEN on the crew "page" THEN I should see delete buttons on the crew AND clicking them should remove the crew from firebase
Dev Notes
add the following to crew component
printCrew
to have a delete button on each card with a class ofdelete-crew
add the following to theTable component
deleteCrewEvent
$(body).on('click', '.delete-crew', deleteCrewEvent)
deleteCrewEvent
does a preventDefault() and then callscrewData.deleteCrew
and passes the crewId (target id of closest card)crewData.deleteCrew
does anaxios.delete
to 'crew/${foodId}.json'console.error('could not delete')
printCrew