@extends('dashboard.layouts.app')
@section('title', trans('admin.add') . ' - ')
@section('speedbar')
    <div class="content-header row">
        <div class="content-header-left col-md-9 col-12 mb-2">
            <div class="row breadcrumbs-top">
                <div class="col-12">
                    <h2 class="content-header-title float-left mb-0">@lang('admin.see')</h2>
                    <div class="breadcrumb-wrapper col-12">
                        <ol class="breadcrumb">
                            <li class="breadcrumb-item ">
                                <a href="{{ route('dashboard') }}">@lang('admin.home')</a>
                            </li>
                            <li class="breadcrumb-item ">
                                <a href="{{ route('dashboard.partner_requests.index') }}">@lang('admin.partners.requests')</a>
                            </li>
                            <li class="breadcrumb-item active">
                                @lang('admin.see')
                            </li>
                        </ol>
                    </div>
                </div>
            </div>
        </div>
    </div>
@endsection

@push('css')
    <link rel="stylesheet" type="text/css"
        href="{{ asset('/vendor/dashboard/app-assets/vendors/css/forms/select/select2.min.css') }}">
@endpush

@section('content')
    <div class="row">
        <div class="col-md-12 col-12">
            <div class="card">
                <div class="card-header">
                    <h4 class="card-title">@lang('admin.see')</h4>
                </div>
                <div class="card-content">
                    <form class="form form-vertical"
                        action="{{ route('dashboard.partner_requests.update', $partnerRequest->id) }}" method="post">
                        @method('PUT')
                        @csrf
                        <div class="card-body">
                            <div class="form-body">
                                <div class="row">
                                    <div class="col-12">
                                        <div class="row">
                                            <div class="col-12">
                                                <div class="form-group">
                                                    <label for="partner">@lang('admin.partner_requests.partner')</label>
                                                    <input disabled type="text" id="partner" required
                                                        class="form-control"
                                                        value="{{ $partnerRequest->partner->getName() }}">

                                                </div>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="col-12">
                                        <div class="form-group">
                                            <label for="city">@lang('admin.partner_requests.city')</label>
                                            <input disabled type="text" id="city" class="form-control"
                                                value="{{ $partnerRequest->city->getName() }}">
                                        </div>
                                    </div>

                                    <div class="col-12">
                                        <div class="form-group">
                                            <label for="price">@lang('admin.partner_requests.price')</label>
                                            <input disabled type="text" id="price" class="form-control"
                                                value="{{ $partnerRequest->price }}">
                                        </div>
                                    </div>

                                    <div class="col-12">
                                        <div class="form-group">
                                            <label for="phone">@lang('admin.partner_requests.phone')</label>
                                            <input disabled type="text" id="phone" class="form-control"
                                                value="+{{ $partnerRequest->phone }}">
                                        </div>
                                    </div>

                                    <div class="col-12">
                                        <div class="form-group">
                                            <label for="full_name">@lang('admin.partner_requests.full_name')</label>
                                            <input disabled type="text" id="full_name" class="form-control"
                                                value="{{ $partnerRequest->full_name }}">
                                        </div>
                                    </div>

                                    <div class="col-12">
                                        <div class="form-group">
                                            <label for="comment">@lang('admin.partner_requests.comment')</label>
                                            <textarea disabled id="comment" class="form-control" placeholder="@lang('admin.partners.comment')">{{ $partnerRequest->comment }}</textarea>
                                        </div>
                                    </div>

                                    <div class="col-12">
                                        <fieldset class="form-group">
                                            <select class="select2 form-control" name="status" required>
                                                <option @selected($partnerRequest->status == 'pending') value="pending">@lang('admin.partner_requests.pending')</option>
                                                <option @selected($partnerRequest->status == 'approved') value="approved">@lang('admin.partner_requests.approved')</option>
                                                <option @selected($partnerRequest->status == 'rejected') value="rejected">@lang('admin.partner_requests.rejected')</option>
                                                <option @selected($partnerRequest->status == 'closed') value="closed">@lang('admin.partner_requests.closed')</option>
                                            </select>
                                        </fieldset>
                                    </div>

                                </div>
                            </div>
                        </div>
                        <div class="card-footer pb-0 pl-0 pt-1">
                            <div class="col-12 mb-0">
                                <div class="row">
                                    <div class="col-3">
                                        <button type="submit"
                                            class="btn btn-primary mr-1 mb-1 waves-effect waves-light btn-icon">
                                            <i class="feather icon-save"></i> @lang('admin.save')
                                        </button>
                                    </div>

                                    <div class="col-9">
                                        <a href="{{ route('dashboard.partner_requests.index') }}"
                                            class="btn btn-danger mr-1 mb-1 waves-effect waves-light btn-icon pull-right">
                                            <i class="feather icon-x-circle"></i> @lang('admin.cancel')
                                        </a>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
@endsection

@push('js')
    <script src="{{ asset('/vendor/dashboard/app-assets/vendors/js/forms/select/select2.full.min.js') }}"></script>
    <script src="{{ asset('/vendor/dashboard/app-assets/js/scripts/forms/select/form-select2.js') }}"></script>
@endpush
