As a user, I should be able to add crew members to a flight.
AC
WHEN looking at the flights "page"
THEN I should see all the flights
Dev Notes
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([]);
`go to the cards for the flights and add a domString for a form
create a event flightController
make an axios call in the data file:
addFlightCrew =(newFlightCrew) => axios.post ($(${baseUrl}/flights.json`, newFlightCrew);
User Story
As a user, I should be able to add crew members to a flight.
AC
WHEN looking at the flights "page"
THEN I should see all the flights
Dev Notes
<input type="checkbox" class="form-check-input- crew-checkbox" d i ${crew.isChecked ? 'checked' : ''}>
; domString +=<label class="form-check-label" for="exampleCheck1">${crew.name}</label>
; domString += '$(
${baseUrl}/flights.json`, newFlightCrew);