Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save micahwierenga/a470cd7c7dddffdff1a877a4b29b4568 to your computer and use it in GitHub Desktop.
Save micahwierenga/a470cd7c7dddffdff1a877a4b29b4568 to your computer and use it in GitHub Desktop.

Mongoose Flights Lab, Part 3: Supplement

These clarifications and wireframes are meant to be a supplement to Mongoose Flights Lab, Part 3.

The Ticket Schema

First, you're to create a Ticket schema with the following fields/properties:

  • seat
  • price
  • flight

User Stories

AAU, when viewing the details page (show view) for a flight, I want to click on an "Add Ticket" link to take me to a form where I can create a ticket.

Mongoose Flights Lab flights/show.ejs


AAU, I want to create tickets by entering the information on a page (new view) that has a form and submitting it.

The form that you're creating should only include the fields you defined in the schema like this:

Mongoose Flights Lab tickets/new.ejs


AAU, when viewing the details page (show view) for a flight, I want to see a list of that flight's tickets (seat & price).

When the tickets are listed, the data for each row should only come from the Ticket schema.

Mongoose Flights Lab flights/show.ejs

Refer to the wireframes above. The styling in these wireframes was taken from the Mongoose Movies lessons, so the feel free to style your app as you please!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment