As a user, I should be able to see the Weapons that go with a Mission.
AC
WHEN a user is not logged in
AND the user clicks the mission link on dashboard
THEN a card with mission details will show
THEN the user should click the "View" button on that card
THEN the user should see all mission components cards
THEN the user should click the "View" button on component card
THEN the user should be able to see all Mission Weapons cards for the mission(see mock-ups)
Dev Notes
Need to create missionWeaponsData.js file inside src/javascripts/helpers/data folder and create an axios call getMissionWeapons promise to get the data imported and turn object of arrays to an array- see seed data ticket for example
Create missionWeapons folder component within javascripts/components and include missionWeapons.js and missionWeapons.scss, be sure to link the js and scss
In missionWeapons.js create a createMissionWeaponCard function that calls the getMissionWeapons and runs it through a forEach loop and create bootstrap cards; this will print out to the mission-weapons div within the html - this will be printed to the DOM upon page load using printToDom
If the userobject is found with firebase.auth().currentUser, then add the edit and delete buttons to the domstring. use this snippet in createMissionWeaponCard
const user = firebase.auth().currentUser;
if (user != null) {
// do stuff
}
User Story
As a user, I should be able to see the Weapons that go with a Mission.
AC
WHEN a user is not logged in AND the user clicks the mission link on dashboard THEN a card with mission details will show THEN the user should click the "View" button on that card THEN the user should see all mission components cards THEN the user should click the "View" button on component card THEN the user should be able to see all Mission Weapons cards for the mission(see mock-ups)
Dev Notes
Need to create missionWeaponsData.js file inside src/javascripts/helpers/data folder and create an axios call getMissionWeapons promise to get the data imported and turn object of arrays to an array- see seed data ticket for example
Create missionWeapons folder component within javascripts/components and include missionWeapons.js and missionWeapons.scss, be sure to link the js and scss
In missionWeapons.js create a createMissionWeaponCard function that calls the getMissionWeapons and runs it through a forEach loop and create bootstrap cards; this will print out to the mission-weapons div within the html - this will be printed to the DOM upon page load using printToDom
If the userobject is found with firebase.auth().currentUser, then add the edit and delete buttons to the domstring. use this snippet in createMissionWeaponCard
const user = firebase.auth().currentUser; if (user != null) { // do stuff }