@extends('admin.layouts.container')
{{--@section('css')--}}
{{--    <link rel="stylesheet" href="{{asset('assets/admin/css/lib/toastr.css')}}">--}}
{{--@endsection--}}
@section('content')
<div class="side-title">
    <h3>{{$head ?? '' }}</h3>
</div>

<div class="border-item">
    <form class="form-row add_service_form" method="post" action="" enctype="multipart/form-data">
{{--        @if($reservation ?? ''  && $reservation->id)--}}
{{--            @method('PUT')--}}
{{--        @endif--}}
{{--        @csrf--}}

            <div class="form-group col-lg-4">
                <label>{{ meta('re_status', $local) ?? __('reservations.re_status') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ __('reservations.'.$reservation->re_status) }}'/>
            </div>
            <div class="form-group col-lg-4">
                <label>{{ meta('re_way', $local) ?? __('reservations.re_way') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ __('reservations.'.$reservation->re_way) }}'/>
            </div>
            <div class="form-group col-lg-4">
                <label>{{ meta('re_no', $local) ?? __('reservations.re_no') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ $reservation->re_no }}'/>
            </div>
            <div class="form-group col-lg-4">
                <label>{{ meta('re_date_from', $local) ?? __('reservations.re_date_from') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ $reservation->re_date_from }}'/>
            </div>
            <div class="form-group col-lg-4">
                <label>{{ meta('re_date_to', $local) ?? __('reservations.re_date_to') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ $reservation->re_date_to }}'/>
            </div>
            <div class="form-group col-lg-4">
                <label>{{ meta('user_name', $local) ?? __('reservations.user_name') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ $reservation->user_name }}'/>
            </div>
            <div class="form-group col-lg-4">
                <label>{{ meta('user_phone', $local) ?? __('reservations.user_phone') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ $reservation->user_phone}}'/>
            </div>
            <div class="form-group col-lg-4">
                <label>{{ meta('hall_name', $local) ?? __('reservations.hall_name') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ $reservation->hall_name}}'/>
            </div>
            <div class="form-group col-lg-4">
                <label>{{ meta('provider_name', $local) ?? __('reservations.provider_name') }} </label>
                <input  readonly class="form-control bg-white"  value='{{ $reservation->provider_name}}'/>
            </div>
        <div class="text-center mt-5 col-12">
            <a href="{{route('reservations.index')}}" class="butn"><span>{{ __('reservations.back_to_reservation') }}</span></a>
        </div>
    </form>
</div>

@endsection

@section('inner_js')

{{--    <script src="{{ asset('assets/admin/js/lib/toastr.min.js') }}"></script>--}}

{{--    <script>--}}
{{--        $('.add_service_button').click(async function (e) {--}}
{{--            e.preventDefault();--}}

{{--            let form = $('.add_service_form'),--}}
{{--                data = new FormData(form[0]),--}}
{{--                url = form.attr('action'),--}}
{{--                method = form.attr('method');--}}

{{--            $('.discount_dates_input').each(function () {--}}
{{--                if ($(this).prop('checked') === false){--}}
{{--                    data.append('discount_dates[]', 0);--}}
{{--                    data.append('discount_percentage[]', 'empty');--}}
{{--                } else {--}}
{{--                    data.append('discount_dates[]', 1);--}}
{{--                    let inputSibling = $(this).siblings('.discount_percentage');--}}
{{--                    data.append('discount_percentage[]', inputSibling.val());--}}

{{--                }});--}}


{{--            const response=await ajax({--}}
{{--                url,--}}
{{--                data,--}}
{{--                dataType: 'json',--}}
{{--                method--}}
{{--            });--}}

{{--            if (response.url){--}}
{{--                window.location.href = response.url;--}}
{{--            }--}}

{{--            if (response.errors){--}}
{{--                toasterError(response.errors);--}}
{{--            }--}}


{{--        });--}}
{{--    </script>--}}

@endsection



