Feature Overview:
Currently listing price is fixed. We need to allow users to select number of guests and dynamically adjust price.
Requirements:
Add guest count input in booking form
Add maxGuests field in Listing schema
Add guests field in Booking schema
Calculate total price using formula: basePrice multiplied by numberOfGuests multiplied by numberOfNights
Prevent booking if guest count exceeds maxGuests
Technical Notes:
Update Listing model
Update Booking model
Add validation in controller
Optionally add live price preview using JavaScript
Acceptance Criteria:
Price calculation works correctly
Guest limit validation works
Proper error messages displayed
Feature Overview:
Currently listing price is fixed. We need to allow users to select number of guests and dynamically adjust price.
Requirements:
Add guest count input in booking form
Add maxGuests field in Listing schema
Add guests field in Booking schema
Calculate total price using formula: basePrice multiplied by numberOfGuests multiplied by numberOfNights
Prevent booking if guest count exceeds maxGuests
Technical Notes:
Update Listing model
Update Booking model
Add validation in controller
Optionally add live price preview using JavaScript
Acceptance Criteria:
Price calculation works correctly
Guest limit validation works
Proper error messages displayed