commit 08.01
This commit is contained in:
155
public/booking-confirm.html
Normal file
155
public/booking-confirm.html
Normal file
@@ -0,0 +1,155 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="ru">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Бронь создана - КлинСервис</title>
|
||||
<style>
|
||||
* { margin: 0; padding: 0; box-sizing: border-box; }
|
||||
body {
|
||||
font-family: Arial, sans-serif;
|
||||
background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
|
||||
min-height: 100vh;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
.container {
|
||||
background: white;
|
||||
padding: 60px 40px;
|
||||
border-radius: 20px;
|
||||
box-shadow: 0 20px 40px rgba(0,0,0,0.1);
|
||||
text-align: center;
|
||||
max-width: 500px;
|
||||
width: 90%;
|
||||
}
|
||||
.success-icon {
|
||||
font-size: 80px;
|
||||
color: #28a745;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
h1 {
|
||||
color: #28a745;
|
||||
font-size: 32px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.booking-number {
|
||||
background: #d4edda;
|
||||
padding: 20px;
|
||||
border-radius: 15px;
|
||||
margin: 30px 0;
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
color: #155724;
|
||||
border: 3px solid #28a745;
|
||||
}
|
||||
.booking-details {
|
||||
background: #f8f9fa;
|
||||
padding: 25px;
|
||||
border-radius: 15px;
|
||||
margin: 20px 0;
|
||||
text-align: left;
|
||||
}
|
||||
.detail-row {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 1px solid #e9ecef;
|
||||
}
|
||||
.detail-row:last-child { border-bottom: none; margin-bottom: 0; }
|
||||
.btn {
|
||||
width: 100%;
|
||||
padding: 18px;
|
||||
margin: 10px 0;
|
||||
border: none;
|
||||
border-radius: 15px;
|
||||
font-size: 18px;
|
||||
font-weight: bold;
|
||||
cursor: pointer;
|
||||
text-decoration: none;
|
||||
display: block;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
.btn-primary { background: #667eea; color: white; }
|
||||
.btn-primary:hover { background: #5a67d8; transform: translateY(-2px); }
|
||||
.btn-secondary { background: #6c757d; color: white; }
|
||||
.btn-secondary:hover { background: #5a6268; }
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 30px;
|
||||
padding-bottom: 20px;
|
||||
border-bottom: 2px solid #e9ecef;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<!-- Хедер -->
|
||||
<div class="header">
|
||||
<a href="index.html" style="font-size: 24px; font-weight: bold; color: #667eea;">← Главная</a>
|
||||
<a href="my-bookings.html" class="btn btn-secondary" style="width: auto; padding: 10px 20px;">Мои брони</a>
|
||||
</div>
|
||||
|
||||
<!-- Успешное подтверждение -->
|
||||
<div class="success-icon">✅</div>
|
||||
<h1>Бронь успешно создана!</h1>
|
||||
<p style="color: #666; margin-bottom: 30px;">Сохраните номер брони — он понадобится для отмены или связи</p>
|
||||
|
||||
<div class="booking-number" id="bookingNumber">CL-2025-0042</div>
|
||||
|
||||
<div class="booking-details" id="bookingDetails">
|
||||
<div class="detail-row">
|
||||
<span>🧹 Услуга:</span>
|
||||
<span>Генеральная уборка</span>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span>👨💼 Сотрудник:</span>
|
||||
<span>Иван Петров</span>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span>📅 Дата:</span>
|
||||
<span>15 июня 2025</span>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span>🕒 Время:</span>
|
||||
<span>10:00–12:00</span>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<span>💰 Стоимость:</span>
|
||||
<span>5000 ₽</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<a href="services.html" class="btn btn-primary">📋 Забронировать еще</a>
|
||||
<a href="my-bookings.html" class="btn btn-secondary">📋 Мои брони</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
// Получить данные брони из localStorage (передается из services.html)
|
||||
const bookingData = JSON.parse(localStorage.getItem('lastBooking') || '{}');
|
||||
|
||||
if (bookingData.booking) {
|
||||
const booking = bookingData.booking;
|
||||
document.getElementById('bookingNumber').textContent = booking.bookingnumber;
|
||||
|
||||
// Заполнить детали (простые циклы для поиска)
|
||||
const services = JSON.parse(localStorage.getItem('services') || '[]');
|
||||
const service = services.find(s => s.id == booking.service_id);
|
||||
|
||||
document.querySelector('#bookingDetails .detail-row:nth-child(1) span:last-child').textContent = service ? service.name : 'Услуга';
|
||||
document.querySelector('#bookingDetails .detail-row:nth-child(4) span:last-child').textContent =
|
||||
`${booking.starttime.slice(0,5)}–${booking.endtime.slice(0,5)}`;
|
||||
document.querySelector('#bookingDetails .detail-row:nth-child(5) span:last-child').textContent =
|
||||
`${booking.service.price || '???'} ₽`;
|
||||
}
|
||||
|
||||
// Очистка localStorage через 30 секунд
|
||||
setTimeout(() => {
|
||||
localStorage.removeItem('lastBooking');
|
||||
}, 30000);
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user