A travel planner app helps to plan in detail the route of the trip, calculate the cost of the trip and get information about the sights.
The journey is based on individual route points. A route point is a separate event in the journey. The route point can be a stop at some place (Check-in, Sightseeing, Restaurant) or a trip by vehicle (Taxi, Bus, Train, Ship, Drive and Flight).
The 'Favorite' button (displayed as an asterisk) adds a route point to favorites.
The 'New Event' button is used to create a new route point.
The time and date are selected using the library flatpickr.js.
Additional options are displayed in the offers block. The set of additional options that the user can select when creating a route point depends on the type of route point. The choice of additional options affects the total cost of the trip.
The total cost of the trip is recalculated when creating/changing/deleting any point on the route.
There are several filters provided in the application: Everything is a complete list of route points, Future is a list of planned route points, Present is a list of current route points, Past is a list of passed route points.
The user can sort the route points by the cost (click on the column heading Price) and duration (click on the column heading Time). To cancel the sorting and return to the original date sorting, the user clicks on the column heading Day.
- Architecture Pattern: MVP
- OOP: Vanilla JavaScript using ES6 Classes
- All JavaScript files are separate ES6 Modules
βββ src
β βββ model
β β βββ filter-model.js
β β βββ point-model.js
β βββ presenter
β β βββ filter-presenter.js
β β βββ headline-presenter.js
β β βββ main-presenter.js
β β βββ new-point-presenter.js
β β βββ point-presenter.js
β βββ view
β β βββ content
β β β βββ headline-view.js
β β β βββ list-view.js
β β β βββ point-editor-view.js
β β β βββ point-view.js
β β βββ stubs
β β β βββ alert-view.js
β β β βββ loader-view.js
β β βββ toolbar
β β βββ cta-button-view.js
β β βββ filter-view.js
β β βββ sort-view.js
β βββ server
β β βββ points-api-service.js
β βββ utils
β β βββ common.js
β β βββ const.js
β β βββ date.js
β β βββ enum.js
β β βββ filter.js
β βββ main.js
βββ public
βββ css
βββ fonts
βββ img
βββ index.html