As a user, I should be able to delete a mission weapon.
AC
GIVEN the user is logged in and visits the missions page
WHEN the user clicks "Delete"button on the mission weapon card
THEN the mission weapon is removed from firebase
AND update the DOM
Dev Notes
Create a function with an axios call in the helpers/data/missionWeaponsData.js (deleteMissionWeapon) file that allows user to delete a mission weapon from Firebase and the DOM (axios.delete)
Create a "Delete" button that prints to every individual mission weapon card, located at the bottom and will have the ID of the mission weapon as the Id of the button.
This button will only delete the mission weapon card associated. The button should have an event listener that reads the missionWeaponId from the button, and deletes the individual weapon from firebase.
The deleteMissionWeapon eventlistener will call the deleteMissionWeapon function to target the data within Firebase and delete it
Call createMissionWeaponCard to update the dom when the delete is successful in the .then of the deleteMissionWeapon call
User Story
As a user, I should be able to delete a mission weapon.
AC
GIVEN the user is logged in and visits the missions page WHEN the user clicks "Delete"button on the mission weapon card THEN the mission weapon is removed from firebase AND update the DOM
Dev Notes
Create a function with an axios call in the helpers/data/missionWeaponsData.js (deleteMissionWeapon) file that allows user to delete a mission weapon from Firebase and the DOM (axios.delete)
Create a "Delete" button that prints to every individual mission weapon card, located at the bottom and will have the ID of the mission weapon as the Id of the button.
This button will only delete the mission weapon card associated. The button should have an event listener that reads the missionWeaponId from the button, and deletes the individual weapon from firebase.
The deleteMissionWeapon eventlistener will call the deleteMissionWeapon function to target the data within Firebase and delete it
Call createMissionWeaponCard to update the dom when the delete is successful in the .then of the deleteMissionWeapon call