@extends('admin.layouts.container')

@section('content')
    <div class="side-title">
        <h3>{{ $head ?? '' }}</h3>
    </div>


    <div class="border-item">
        <form class="form-row">

            <div class="form-group col-lg-6">
                <label>{{ __('orders.name') }} </label>
                <p class="form-control" style="height: auto">{{$order->name}}</p>
            </div>
            <div class="form-group col-lg-6">
                <label>{{ __('orders.email') }} </label>
                <p class="form-control" style="height: auto">{{$order->email}}</p>
            </div>
            <div class="form-group col-lg-6">
                <label>{{ __('orders.phone') }} </label>
                <p class="form-control" style="height: auto">{{$order->phone}}</p>
            </div>
            <div class="form-group col-lg-6">
                <label>{{ __('orders.count_hours') }} </label>
                <p class="form-control" style="height: auto">{{$order->count_hours}}</p>
            </div>
            <div class="form-group col-lg-6">
                <label>{{ __('orders.reservation_date') }} </label>
                <p class="form-control" style="height: auto">{{$order->reservation_date}}</p>
            </div>
            <div class="form-group col-lg-6">
                <label>{{ __('orders.reservation_time') }} </label>
                <p class="form-control" style="height: auto">{{$order->reservation_time}}</p>
            </div>
            <div class="form-group col-lg-6">
                <label>{{ __('orders.photo_usage') }} </label>
                <p class="form-control" style="height: auto">{{__('orders.types.'.$order->photo_usage)}}</p>
            </div>
            <div class="form-group col-lg-6">
                <label>{{ __('orders.status') }} </label>
                <p class="form-control" style="height: auto">{{__('orders.statuses.'.$order->status)}}</p>
            </div>
            <div class="form-group col-lg-12">
                <label>{{ __('orders.note') }}</label>
                <p class="form-control overflow-auto" style="height: 200px;">{{$order->note}}</p>
            </div>
            @if(count($order->features))
                <div class="form-group col-lg-12">
                    <h3>{{__('orders.statuses.'.$order->status)}}</h3>
                </div>
                @foreach($order->features as $row)
                    <div class="form-group col-lg-6">
                        <p class="form-control" style="height: auto">{{$row->feature->currentDescription->title}}</p>
                    </div>
                @endforeach
            @endif
            
            @if(count($order->attributes))
                <div class="form-group col-lg-12">
                    <h3>{{__('orders.additions')}}</h3>
                </div>
                @foreach($order->attributes as $row)
                    <div class="form-group col-lg-6">
                        <p class="form-control" style="height: auto">{{$row->attribute->currentDescription->title . ' - ('.$row->count.')'}}</p>
                    </div>
                @endforeach
            @endif
            

        </form>
    </div>

@endsection

@section('inner_js')
    <!-- Editor JS orders -->
    <script src="{{ asset('/assets/admin/js/lib/tinymce.min.js') }}"></script>-
    <script>
        var route_prefix = "{{ url(config('lfm.prefix')) }}";
        var url = "{{url('/')}}/";
    </script>
    <script src="{{ asset('assets/admin/js/editor.js') }}"></script>
    <script src="{{ asset('assets/admin/js/lfm.js') }}"></script>

@endsection
