{{ $pageTitle ?? __('messages.list') }}
{{ __('messages.back') }} @if($auth_user->can('booking list')) @endif
{{ Form::model($bookingdata,['method' => 'POST','route'=>'booking.store', 'data-toggle'=>"validator" ,'id'=>'booking'] ) }} {{ Form::hidden('id') }}
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.service') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('service_id', [optional($bookingdata->service)->id => optional($bookingdata->service)->name], optional($bookingdata->service)->id, [ 'class' => 'select2js form-group service', 'required', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.service') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'service']), ]) }}
@if (auth()->user()->hasRole(['admin']))
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.customer') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('customer_id', [optional($bookingdata->customer)->id => optional($bookingdata->customer)->display_name], optional($bookingdata->customer)->id, [ 'class' => 'select2js form-group customer', 'required', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.customer') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'user']), ]) }}
@else @endif
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.coupon') ]),['class'=>'form-control-label']) }}
{{ Form::select('coupon_id', [optional($bookingdata->coupon)->id => optional($bookingdata->coupon)->name], optional($bookingdata->coupon)->id, [ 'class' => 'select2js form-group coupon', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.coupon') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'coupon']), ]) }}
{{ Form::label('date',__('messages.date').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('date',old('date'),['placeholder' => __('messages.date'),'class' =>'form-control min-datetimepicker','required']) }}
{{ Form::label('address',__('messages.address').' *',['class'=>'form-control-label'], false ) }} {{ Form::textarea('address', null, ['class'=>"form-control textarea" , 'rows'=>3 , 'placeholder'=> __('messages.description') ]) }}
{{ Form::label('description',__('messages.description'), ['class' => 'form-control-label']) }} {{ Form::textarea('description', null, ['class'=>"form-control textarea" , 'rows'=>3 , 'placeholder'=> __('messages.description') ]) }}
{{ Form::submit( __('messages.save'), ['class'=>'btn btn-md btn-primary float-right']) }} {{ Form::close() }}