@extends('backend.layouts.app')
@section('content')
<style>
   table {
    table-layout: fixed; /* Ensure table layout is fixed */
    width: 100%; /* Use full width */
}
</style>
<div class="row page-titles">
    <div class="col-md-5 align-self-center">
      <h4 class="text-themecolor">Service Manager</h4>
    </div>
    <div class="col-md-7 align-self-center text-right">
        <div class="d-flex justify-content-end align-items-center">
            <ol class="breadcrumb">
                <li class="breadcrumb-item"><a href="{{ route('dashboard') }}">Dashboard</a></li>
                <li class="breadcrumb-item "><a href="{{ route('service.index') }}">Service Manager</a></li>
                <li class="breadcrumb-item"><a href="{{ route('service.bookinglist',['serviceid' => $bookingDetails->service_id]) }}">Booking List </a></li>
                <li class="breadcrumb-item active">View Booking Detail</li>
            </ol>
        </div>
    </div>
</div>
<div class="container-fluid">
    <section class="content">
        <div class="row">
            <div class="col-12">
                <div class="card">
                    <div class="card-body">
                        <div class="card-title" style="width:100%;display: inline-block;">
                            <span class="caption-subject font-green bold uppercase">View Booking Detail <span>
                            <a href="{{ route('service.bookinglist',['serviceid' => $bookingDetails->service_id]) }}"> <button type="button" class="btn btn-primary btn-sm float-right"><i class="fa fa-arrow-left"></i> Back</button></a>
                        </div>
                        <table id="example2" class="table table-bordered table-striped">
                            <tbody>

                                <tr>
                                    <th>Client Name</th>
                                    <td>{{  (!empty($bookingDetails->client_name)) ?  $bookingDetails->client_name :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Email</th>
                                    <td>{{  (!empty($bookingDetails->email)) ?  $bookingDetails->email :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Mobile Number</th>
                                    <td>{{  (!empty($bookingDetails->mobile_number)) ?  $bookingDetails->mobile_number :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Service Hours</th>
                                    <td>{{ (!empty($bookingDetails->service_hours)) ?  $bookingDetails->service_hours :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Booking Date</th>
                                    <td>
                                        {{ $bookingDetails->booking_date ? \Carbon::parse($bookingDetails->booking_date)->format(config('GET.admin_date_time_format') ?? 'Y-m-d') : '-' }}
                                    </td>

                                </tr>

                                <tr>
                                    <th>Total Price</th>
                                    <td>${{ (!empty($bookingDetails->total_price)) ?  $bookingDetails->total_price :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Special Instructions</th>
                                    <td>${{ (!empty($bookingDetails->special_instructions)) ?  $bookingDetails->special_instructions :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Address Line</th>
                                    <td>{{ $bookingDetails->address_line }}
                                        {{ ', '.$bookingDetails->city?->name  }}
                                        {{ ', '.$bookingDetails->state?->name }}
                                        {{ ', '.$bookingDetails->country?->name}}
                                        {{ ', '.$bookingDetails->post_code }}
                                    </td>
                                </tr>

                                <tr>
                                    <th>Payment Method</th>
                                    <td>{{ (!empty($bookingDetails->payment_method)) ?  ucfirst($bookingDetails->payment_method) :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Payment Status</th>
                                    <td>{{ (!empty($bookingDetails->payment_status)) ?  ucfirst($bookingDetails->payment_status) :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Payment Reference</th>
                                    <td style="word-wrap: break-word;">{{ (!empty($bookingDetails->payment_reference)) ?  ucfirst($bookingDetails->payment_reference) :  '-' }}</td>
                                </tr>

                                <tr>
                                    <th>Created At</th>
                                    <td>{{ ($bookingDetails->created_at)? $bookingDetails->created_at->format(config('GET.admin_date_time_format') ?? 'Y-m-d '):'-' }}</td>
                                </tr>
                                <tr>
                                    <th>Updated At</th>
                                    <td>{{ ($bookingDetails->updated_at)? $bookingDetails->updated_at->format(config('GET.admin_date_time_format') ?? 'Y-m-d '):'-' }}</td>
                                </tr>
                                <tr>
                                    <th>Status</th>
                                    <td>@if ($bookingDetails->status == 1) <span class="label label-success label-rounded">Active</span> @else <span class="label label-danger label-rounded">Inactive </span>@endif</td>
                                </tr>
                            </tbody>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </section>
</div>


@stop
