plannedFlightsData.getPlannedFlights should make anaxios.gettoflights.json`
on failure of plannedFlightsData.getPlannedFlights promise console.error('unable to get planned flights')
on success of plannedFlightsData.getPlannedFlights promise should build up adomStringwith a h2 tag and loop over all the flights and for each flight callbuildPlannedFlights`
In src/javascripts/helpers/data create a smashData.js file to add the data to the planned flights
const getAllFlightInfo = ( ) => new Promise (resolve, reject) => {
planesData.js.getPlanes( )
.then((planesResponse) =>{
hubData.getAllAirports( ).then((hubResponse) => {
crewData.js.getAllCrews( ).then((crewResponse) => {
foodData.js.getAllFoods( ) . then ((foodResponse)= {
resolve([]);
User Story
As a user, I should be able to view all planned flights.
AC
WHEN looking at the flights "page"
THEN I should see all the planned flights
Dev Notes
create a div in index.html with an id of
planned-flights
, class of hideupdate
authData.checkLoginStatus
and add removeClass into the if statement forplanned-flights
create a
plannedFlights
component with a function calledbuildPlannedFlights
add this function to the export defaultbuildPlannedFlights
should call
plannedFlightsData.getPlannedFlights`plannedFlightsData.getPlannedFlights should make an
axios.getto
flights.json`on failure of
plannedFlightsData.getPlannedFlights
promiseconsole.error('unable to get planned flights')
on success of
plannedFlightsData.getPlannedFlights promise should build up a
domStringwith a h2 tag and loop over all the flights and for each flight call
buildPlannedFlights`In src/javascripts/helpers/data create a smashData.js file to add the data to the planned flights const getAllFlightInfo = ( ) => new Promise (resolve, reject) => { planesData.js.getPlanes( ) .then((planesResponse) =>{ hubData.getAllAirports( ).then((hubResponse) => { crewData.js.getAllCrews( ).then((crewResponse) => { foodData.js.getAllFoods( ) . then ((foodResponse)= { resolve([]);