Hi everyone,
I’m literally facing the final boss right now and need help with this.
I’m currently in the last part of my program, which is about creating travel packages with hotel bookings and converting them into a PDF for the client.
Now I’m working on the final section, which is about adding recreational activities or a customized schedule for the package.
The table should be generated based on the hotel bookings.
For example:
A hotel booking from January 10 to January 15.
When reaching the activities section after adding the hotel booking, a prefilled list should appear showing the days from the start of the booking to the end, including all the days between the check-in and check-out. These days should be filled dynamically with random activities based on the available activities in the city where the hotel is booked.
As shown in the table below:
| Date | Activities | City |
|------------|-------------------------------------------------- ----|-----------|
| Jan 10 | Check-in at the hotel and explore downtown | City |
| Jan 11 | Recreational activities for the day | City |
| Jan 12 | Recreational activities for the day | City |
| Jan 13 | Recreational activities for the day | City |
| Jan 14 | Recreational activities for the day | City |
| Jan 15 | Check-out from the hotel and head to the airport | City |
Here’s what I need:
- The first row should include the check-in date with a welcoming message like “Check-in at the hotel” and the city name.
- Dynamically generate the days between the check-in and check-out with random activities for each day based on the activities available in the city.
- The last row should include a farewell message for the end of the booking with the check-out date.
The issue:
I have multiple hotel bookings and need to generate the same table for each booking in the same list.
Additionally, I couldn’t link the city of the booking to the appropriate activities so that the correct activities appear for each city.
I’ve tried a lot of ways, but nothing worked. Maybe it’s simple, but I just can’t figure it out.
Any help is greatly appreciated, and thank you all in advance!
Note:
- I have a database for hotel bookings.
- I also have a database for cities and their activities.
Thank you, everyone!