As a user, I should be able to see the personnel that belong to a Mission.
Acceptance Criteria
WHEN the user visits the Mission page
THEN selects the appropriate mission
AND the user clicks View Details for Personnel
AND a card with Personnel details will show
AND the user will see all of the mission personnel for the particular mission
Dev Notes
Need to create missionPersonnelData.js file inside src/javascripts/helpers/data folder and create an axios call getMissionPersonnelByMissionId promise to get the data imported and turn object of arrays to an array- see seed data ticket for example
Create missionPersonnel folder component within javascripts/components and include missionPeronnel.js and missionPersonnel.scss, be sure to link the js and scss
In missionPersonnel.js create a createMissionPersonnelCard function that calls the getMissionPersonnelByMissionId and runs it through a forEach loop and create bootstrap cards; this will print out to the mission-personnel 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 createMissionPersonnelCard
const user = firebase.auth().currentUser;
if (user != null) {
// do stuff
}
User Story
As a user, I should be able to see the personnel that belong to a Mission.
Acceptance Criteria
WHEN the user visits the Mission page THEN selects the appropriate mission AND the user clicks View Details for Personnel AND a card with Personnel details will show AND the user will see all of the mission personnel for the particular mission
Dev Notes
Need to create missionPersonnelData.js file inside src/javascripts/helpers/data folder and create an axios call getMissionPersonnelByMissionId promise to get the data imported and turn object of arrays to an array- see seed data ticket for example
Create missionPersonnel folder component within javascripts/components and include missionPeronnel.js and missionPersonnel.scss, be sure to link the js and scss
In missionPersonnel.js create a createMissionPersonnelCard function that calls the getMissionPersonnelByMissionId and runs it through a forEach loop and create bootstrap cards; this will print out to the mission-personnel 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 createMissionPersonnelCard
const user = firebase.auth().currentUser; if (user != null) { // do stuff }