datastackacademy / deb-archive

TuraLabs FREE Data Engineering Bootcamp
Apache License 2.0
3 stars 6 forks source link

Ch2 Front end - Dropdown filter and local storage previous query #13

Closed sarakane closed 3 years ago

sarakane commented 3 years ago

User Stories

As a user, I want the departure airport to be removed from the destination airport dropdown so that I can’t select the same departure and destination The select options for departure airport and destination airport is data from the preload API call that is formatted and stored in an array. The array is stored in local storage and the preload state variable as ‘preload.airports’

AC:

As a user I want the previous valid search to be shown if I make a search that is not valid or a search where there are no flights so that I can still view my last valid search The previous query is saved in local storage correctly and is only changed when there is another valid query made, but it is never used

AC:

Changes Made

Type of Changes

Type
🐛 Bug Fix
✨ New Feature
🔨 Refactoring
💯 Add tests
🔗 Update dependencies
📜 Docs

Testing Steps / QA Criteria

Set up and run the Flask API

  1. In ch2-flight-search-api/creds add a service account KEY FILE
  2. Run the following command:
    export GOOGLE_APPLICATION_CREDENTIALS="[PATH TO KEY FILE]"
  3. In ch2-flight-search-api install or activate your python virtualenv and install all packages in requirements.txt
  4. Run the following command to start the application:
    python3.7 run.py

    The REST API should now be available on http://localhost:5000

Set up and run the front end

  1. In ch2-flight-search-fontend run npm install to install project dependencies.
  2. Run npm run start to start the application

The application should be available on http://localhost:3000