-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathubookscript.js
More file actions
36 lines (33 loc) · 1.07 KB
/
Copy pathubookscript.js
File metadata and controls
36 lines (33 loc) · 1.07 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
// Example static data (can be replaced with data from a backend/API)
const reservations = [
{
reservationId: 'R12345',
checkIn: '2025-07-10',
checkOut: '2025-07-15',
roomNumber: '301'
},
{
reservationId: 'R12346',
checkIn: '2025-08-01',
checkOut: '2025-08-05',
roomNumber: '204'
},
{
reservationId: 'R12347',
checkIn: '2025-09-10',
checkOut: '2025-09-12',
roomNumber: '105'
}
];
const bookingList = document.getElementById('booking-list');
reservations.forEach(reservation => {
const bookingCard = document.createElement('div');
bookingCard.classList.add('booking-card');
bookingCard.innerHTML = `
<p><strong>Reservation ID:</strong> ${reservation.reservationId}</p>
<p><strong>Check-in Date:</strong> ${reservation.checkIn}</p>
<p><strong>Check-out Date:</strong> ${reservation.checkOut}</p>
<p><strong>Room Number:</strong> ${reservation.roomNumber}</p>
`;
bookingList.appendChild(bookingCard);
});