{{ $pageTitle ?? __('messages.list') }}
{{ __('messages.back') }} @if($auth_user->can('service list')) @endif
{{ Form::model($servicedata,['method' => 'POST','route'=>'service.store', 'enctype'=>'multipart/form-data', 'data-toggle'=>"validator" ,'id'=>'service'] ) }} {{ Form::hidden('id') }}
{{ Form::label('name', __('messages.name').' *', ['class' => 'form-control-label'], false) }} {{ Form::text('name', old('name'), ['placeholder' => __('messages.name'), 'class' => 'form-control', 'title' => 'Please enter alphabetic characters and spaces only']) }}
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.category') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('category_id', [optional($servicedata->category)->id => optional($servicedata->category)->name], optional($servicedata->category)->id, [ 'class' => 'select2js form-group category', 'required', 'id' => 'category_id', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.category') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'category']), ]) }}
{{ Form::label('subcategory_id', __('messages.select_name',[ 'select' => __('messages.subcategory') ]),['class'=>'form-control-label'],false) }}
{{ Form::select('subcategory_id', [], [ 'class' => 'select2js form-group subcategory_id', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.subcategory') ]), ]) }}
@if(auth()->user()->hasAnyRole(['admin','demo_admin']))
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.provider') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('provider_id', [ optional($servicedata->providers)->id => optional($servicedata->providers)->display_name ], optional($servicedata->providers)->id, [ 'class' => 'select2js form-group', 'id' => 'provider_id', 'onchange' => 'selectprovider(this)', 'required', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.provider') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'provider']), ]) }}
@endif
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.provider_address') ]),['class'=>'form-control-label'],false) }}
{{ Form::select('provider_address_id[]', [], old('provider_address_id'), [ 'class' => 'select2js form-group provider_address_id', 'id' =>'provider_address_id', 'multiple' => 'multiple', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.provider_address') ]), ]) }} @if(auth()->user()->hasAnyRole(['provider'])) {{ trans('messages.add_form_title',['form' => trans('messages.provider_address') ]) }} @else {{ trans('messages.add_form_title',['form' => trans('messages.provider_address') ]) }} @endif
{{ Form::label('type',__('messages.price_type').' *',['class'=>'form-control-label'],false) }} {{ Form::select('type',['fixed' => __('messages.fixed') , 'hourly' => __('messages.hourly'), 'free' => __('messages.free') ],old('status'),[ 'class' =>'form-control select2js','required' ,'id'=>'price_type']) }}
{{ Form::label('price',__('messages.price').' *',['class'=>'form-control-label'],false) }} {{ Form::text('price',null, [ 'min' => 1, 'step' => 'any' , 'placeholder' => __('messages.price'),'class' =>'form-control', 'required','id' => 'price', 'pattern' => '^\\d+(\\.\\d{1,2})?$' ]) }}
{{ Form::label('discount',__('messages.discount').' %', ['class' => 'form-control-label']) }} {{ Form::number('discount',null, [ 'min' => 0,'max' => 99, 'step' => 'any' , 'id' =>'discount','placeholder' => __('messages.discount'),'class' =>'form-control']) }}
{{ Form::label('duration', __('messages.duration').' (hours) ', ['class' => 'form-control-label'], false) }} {{ Form::text('duration', old('duration'), ['placeholder' => __('messages.duration'), 'class' => 'form-control min-datetimepicker-time']) }}
{{ Form::label('status',__('messages.status').' *',['class'=>'form-control-label'],false) }} {{ Form::select('status',['1' => __('messages.active') , '0' => __('messages.inactive') ],old('status'),[ 'class' =>'form-control select2js','required']) }}
{{ Form::label('visit_type', __('messages.visit_type').' ',['class'=>'form-control-label'],false) }}
{{ Form::select('visit_type',$visittype,old('visit_type'),[ 'id' => 'visit_type' ,'class' =>'form-control select2js','required']) }}
@if(getMediaFileExit($servicedata, 'service_attachment')) @php $attchments = $servicedata->getMedia('service_attachment'); $file_extention = config('constant.IMAGE_EXTENTIONS'); @endphp

{{ __('messages.attached_files') }}

@foreach($attchments as $attchment )