As a user, I should be able to remove crew members from 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:
deleteFlightCrew =(flightCrewId) => axios.delete($(${baseUrl}/flights/${flightCrewId}.json`);
User Story
As a user, I should be able to remove crew members from 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
crew.forEach((crew) => { domString += '
<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 += 'add event listener ('body').on(;click', '.crew-checkbox', flightController)
create a event flightController make an axios call in the data file: deleteFlightCrew =(flightCrewId) => axios.delete(
$(
${baseUrl}/flights/${flightCrewId}.json`);