{% extends "admin_base.html" %}

{% block title %}View Booking{% endblock %}

{% block content %}
<h1 class="mb-4">Booking Details</h1>

<div class="card">
    <div class="card-body">
        <h5 class="card-title">Booking #{{ booking.id }}</h5>
        <p><strong>Customer Name:</strong> {{ booking.customer_name }}</p>
        <p><strong>Customer Email:</strong> {{ booking.customer_email }}</p>
        <p><strong>Start Date:</strong> {{ booking.start_date.strftime('%Y-%m-%d') }}</p>
        <p><strong>End Date:</strong> {{ booking.end_date.strftime('%Y-%m-%d') }}</p>
        <p><strong>Car:</strong> {{ booking.car.name if booking.car else 'N/A' }}</p>
        <p><strong>Tour:</strong> {{ booking.tour.name if booking.tour else 'N/A' }}</p>
        <p><strong>Created At:</strong> {{ booking.created_at.strftime('%Y-%m-%d %H:%M') }}</p>
    </div>
</div>

<a href="{{ url_for('admin.manage_bookings') }}" class="btn btn-secondary mt-3">Back to Bookings</a>
{% endblock %}