User Story
As a user, I should be able to delete a destination.
AC
WHEN the user should see an Delete Destination Button
THEN the user should see the entry on the table be deleted.
AND the destination information should also be deleted from firebase.
Dev Notes
In helpers/data destination.js
add function deleteDestination
``const deleteDestination = (destinationId) => axios.delete(${baseUrl}/destination/${destinationId}.json`);
export deleteDestination
import deleteDestination to destination.js
create a function called deleteDestinationRecord that captures the id of the destination and passes it to deleteDestination
add a button - delete - with the text Delete on it.
use jQuery for the click event.
the target should find the closest id of a button.
after deleting the destination data from Firebase, call the destinationBuilder function.
Bootstrap button with the colors as shown in the wireframe.
User Story As a user, I should be able to delete a destination.
AC WHEN the user should see an Delete Destination Button THEN the user should see the entry on the table be deleted. AND the destination information should also be deleted from firebase.
Dev Notes
In helpers/data destination.js
add function deleteDestination
``const deleteDestination = (destinationId) => axios.delete(
${baseUrl}/destination/${destinationId}.json`);export deleteDestination
import deleteDestination to destination.js
create a function called deleteDestinationRecord that captures the id of the destination and passes it to deleteDestination
add a button - delete - with the text Delete on it.
use jQuery for the click event.
the target should find the closest id of a button.
after deleting the destination data from Firebase, call the destinationBuilder function.
Bootstrap button with the colors as shown in the wireframe.