nss-evening-cohort-06 / theme-park-m3diators

theme-park-m3diators created by GitHub Classroom
3 stars 1 forks source link

"Out of Order" rides should be fixed upon first maintenance ticket being completed #26

Open zoeames opened 7 years ago

zoeames commented 7 years ago

Story

As a park administrator, I should be able to have my ride status fixed upon maintenance being completed.

Acceptance Criteria

Given a ride is "out of order" When the first maintenance ticket is completed Then my database should be updated to reflect that the ride is no longer out of order And any remaining maintenance tickets should stay scheduled, but should be considered "upkeep"

Matthensley777 commented 7 years ago

const saveToFirebase = ()=> {
themepark.outoforder = rideMaintanance
       return new Promise((resolve, reject) =>{
        $.ajax({
            method: "POST",
            url: `${firebaseKey.databaseURL}/theme-park.json`,
            data: JSON.stringify(arrays)
        }).then((result) => {
            resolve(result);
        }).catch((error) => {
            reject(error);
        });
    });
};
}