Enable booking functionality#38
Open
Sappymukherjee214 wants to merge 5 commits intoAMANkumar0004:mainfrom
Open
Enable booking functionality#38Sappymukherjee214 wants to merge 5 commits intoAMANkumar0004:mainfrom
Sappymukherjee214 wants to merge 5 commits intoAMANkumar0004:mainfrom
Conversation
Contributor
Author
|
@AMANkumar0004 I have added the feature along with screenshot. Please label the PR for the issue #29 |
There was a problem hiding this comment.
Pull request overview
This PR enables end-to-end booking and trip-planning functionality, adding booking creation/history views plus a favorites-based itinerary planner.
Changes:
- Added Booking and Itinerary models with corresponding routes/controllers and new dashboard views.
- Introduced favorites + itinerary planner UI and navigation entry points.
- Expanded listing schema/validation to support max guest limits and booking validation.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 8 comments.
Show a summary per file
| File | Description |
|---|---|
| wanderLust | Updates subproject pointer to include the new booking/planner work. |
| views/users/dashboard.ejs | Adds “My Bookings” dashboard UI. |
| views/planner/new_itinerary.ejs | Adds itinerary creation form with dynamic destination items. |
| views/planner/edit_itinerary.ejs | Adds itinerary editing UI with dynamic items. |
| views/planner/dashboard.ejs | Adds planner dashboard showing favorites + itineraries. |
| views/listings/show.ejs | Adds booking form, favorites toggle, and refactors map data bootstrapping. |
| views/listings/new.ejs | Adds “max guests” input to listing creation UI. |
| views/listings/edit.ejs | Adds “max guests” input to listing edit UI. |
| views/listings/bookings.ejs | Adds owner-facing booking history table for a listing. |
| views/includes/navbar.ejs | Adds nav links to “My Bookings” and “My Trips”. |
| routes/user.js | Adds /dashboard route (bookings dashboard). |
| routes/planner.js | Adds favorites + itinerary planner endpoints. |
| routes/booking.js | Adds nested booking endpoints under listings. |
| public/js/map.js | Updates map initialization to use refactored listing bootstrap data. |
| models/user.js | Adds favorites field referencing listings. |
| models/listing.js | Adds maxGuests and formatting updates. |
| models/itinerary.js | Introduces Itinerary schema/model. |
| models/booking.js | Introduces Booking schema/model. |
| middleware.js | Adds Joi booking validation middleware. |
| init/index.js | Updates seeding behavior and environment loading. |
| controllers/users.js | Adds dashboard controller to render user bookings. |
| controllers/bookings.js | Adds booking creation + listing booking-history controllers. |
| app.js | Wires planner + booking routers and formats session config. |
| Schema.js | Adds booking schema and extends listing schema with maxGuests. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Owner
|
@Sappymukherjee214 conflicts |
Contributor
Author
|
@AMANkumar0004 conflicts resolved |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request adds major new features to the application, including a booking system for listings, user dashboards for managing bookings and trips, and an itinerary planner with favorites functionality. It also introduces new database schemas and validation, updates navigation, and improves schema validation and seed data handling.
Issue: #29
Booking System and Validation
Bookingmodel and booking-related controllers, routes, and middleware. [1] [2] [3] [4] [5] [6] [7] [8]Itinerary Planner and Favorites
Itinerarymodel and planner routes/controllers. [1] [2] [3] [4] [5] [6]Schema and Model Enhancements
Listingschema to includemaxGuestsfor guest validation during booking. [1] [2]favoritesarray for the planner feature.Seed Data and Environment Handling
UI/UX Improvements
These changes collectively provide users with the ability to book listings, manage their bookings, plan trips, and maintain favorites, significantly enhancing the application's functionality and user experience.
Screenshot: