Giter Club home page Giter Club logo

travel-tracker's Introduction

Travel Tracker

A hosted web application to cost, track, and book trips for individual travelers.

  1. Functionality
  2. Installation
  3. Technologies
  4. Contributors
  5. Links

Functionality

Login Page View

  • To login to the page, type in the word "traveler" + any two-digit number, 01 - 50 (e.g. 'traveler06').
  • Type in the password - travel2020 - and click the login button.
  • You'll then be taken to the home page and greeted by the name of the user you've selected, with that user's travel data displayed.

Home Page View

  • Within the page header, the user's "Annual Travel Costs" are instantly calculated and displayed in the upper right corner.

  • Below that is a "Logout" button, which can be clicked at any time to clear the "traveler" data and return the user back to the login page.

  • In the center is a nav bar with four buttons: Current Trips, Upcoming Trips, Previous Trips, and Pending Trips, each toggling the display of the a different collection of "trip cards" in the main section below.

  • On the left end of the header is a Travel Tracker company logo, which has been activated as a "Home" button and can be clicked to take the user back to same "My Trips" view displayed on initial page load.

  • Below the header is an interactive "Plan Your Next Adventure" section, through which a user can book a new trip.

Functionality Demonstration GIF

  • This section is completely navigable via keyboard, and contains four required input fields:
    • Select Destination: drop-down menu containing a list of all possible travel destinations, a dynamic list that auto-populates on page load.
    • Departure Date: drop-down calendar menu allowing a user to select the first date of their trip. Since our "trips" dataset is comprised entirely of past dates, the calendar starts in 2019, and the user can book as far out as 2035.
    • Duration of trip: input box (with clickable arrow to increment/decrement value) to type or select the trip length, represented in number of days.
    • Number of travelers: input box (with clickable arrow to increment/decrement value) to type or select the trip length in number of days.
  • Once all four fields have been filled out, the user can click two different buttons to process this information:
    • Estimate Trip Cost: will display a modal window with the estimated cost of this trip, including airfare, lodging and the 10% agent fee.
    • Book Trip: submit the trip request by posting data to the API with a trip status of "pending", requiring the agent's approval.
  • The trip is then automatically loaded into the "My Trips" view, and a modal window pops-up to notify the user of their successful booking, with the message including both the destination name and the estimated trip cost.
  • Error Handling: several error messages have been built into the data functionality, utilizing accessiblity-friendly modal windows to display: unsuccessful GET and POST requests to the API, incomplete form selections (when clicking either booking button), and invalid username or password submission on the login page.

Responsiveness Demonstration GIF

Installation

  • Clone down remote repository by entering git clone [email protected]:pcmueller/travel-tracker.git in console
  • Use command cd to navigate into new travel-tracker directory
  • Install repository dependencies using npm i
  • Initialize webpack server using command npm start
  • Clone down travel-tracker-api by following these instructions
  • Navigate into cloned API directory
  • Initialize local server using command npm start
  • Once both servers are initialized, you can access the application in your browser here

Technologies

  1. HTML
  2. CSS/Sass
  3. JavaScript
  4. Express
  5. Webpack
  6. Mocha & Chai
  7. GitHub

Contributors

Links

travel-tracker's People

Stargazers

 avatar

Watchers

 avatar

travel-tracker's Issues

Pseudocode Iterations 1 and 2 functionality

  1. Dashboard
    As a traveler:

I should see a dashboard page that shows me:
All of my trips (past, present, upcoming and pending)
Total amount I have spent on trips this year. This should be calculated from the trips data and include a travel agent’s 10% fee

  1. Traveler Interaction
    As a traveler:

I should be able to make a trip request:
I will select a date, duration, number of travelers and choose from a list of destinations
After making these selections, I should see an estimated cost (with a 10% travel agent fee) for the trip.
Once I submit the trip request, it will show on my dashboard as “pending” so that the travel agency can approve or deny it.

Pseudocode Iteration 3 functionality (Login)

  1. Login
    When first arriving at the site, a user should be able to log in with a username and password.

As a traveler:

I should be able to login:

  • I will see a login page when I first visit the site:
  • I can log in with the following credentials:
    • username: traveler50 (where 50 is the ID of the user)
    • password: travel2020
  • Upon successfully loggin in, I should see my dashboard.

Refactor testing

TEST FILES:

Traveler

  • properties
  • methods
  • sad paths

Trip

  • properties
  • methods
  • sad paths

TESTING DATA:

  • Cut datasets down to minimum num elements needed*

Build basic scripts.js structure

  • Declare global variables and query selectors
  • Assign event listeners
  • Create basic page-load functionality to call API functions and pass data into variables

Pseudocode Iteration 4 functionality (Agent)

  1. Agent Interaction
    Your app should now support two different types of users. In addition to having a traveler, you will now add a travel agency.

As a travel agent:

  • I should be able to login:
  • I will see a login page when I first visit the site:
  • I can log in with the following credentials:
    • username: agency
    • password: travel2020

As a travel agent, upon logging in:

I should see a dashboard page that shows me:

  • New trip requests (a user’s “pending” trips)
  • Total income generated this year (should be 10% of user trip cost)
  • Travelers on trips for today’s date (number, names, however you want to display this!)

As a travel agent:

  • I should be able to see and approve / deny trip requests
  • I should be able to search for any user by name and:
  • View their name, a list of all of their trips, and the total amount they’ve spent (including 10% agent cut)
  • Approve a trip request for that user
  • Delete an upcoming trip for that user

Class structure planning and set-up

  • Sketch out basic Class hierarchy, structure and functionality
  • Create Class files w/ constructors and exports, import to JS entrypoint
  • Create testing and test-data files using API dataset elements

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.