{{ $pageTitle ?? trans('messages.list') }}
@if($auth_user->can('servicepackage list')) {{ __('messages.back') }} @endif
{{ Form::model($servicepackage,['method' => 'POST','route'=>'servicepackage.store', 'enctype'=>'multipart/form-data', 'data-toggle'=>"validator" ,'id'=>'servicepackage'] ) }} {{ Form::hidden('id') }}
{{ Form::label('name',trans('messages.name').' *',['class'=>'form-control-label'], false ) }} {{ Form::text('name',old('name'),['placeholder' => trans('messages.name'),'class' =>'form-control','required']) }}
@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($servicepackage->providers)->id => optional($servicepackage->providers)->display_name ], optional($servicepackage->providers)->id, [ 'class' => 'select2js form-group', 'id' => 'provider_id', 'required', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.provider') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'provider']), ]) }}
@endif
{{ Form::label('package_type', __('messages.package_type'), ['class' => 'form-control-label'], false) }} {{ Form::select('package_type', ['single' => __('messages.single'), 'multiple' => __('messages.multiple')], old('package_type'), ['class' => 'form-control ','id' => 'package_type','required']) }}
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.category') ]).' *',['class'=>'form-control-label',],false) }}
{{ Form::select('category_id', [optional($servicepackage->category)->id => optional($servicepackage->category)->name], optional($servicepackage->category)->id, [ 'class' => 'select2js form-group category', 'id' => 'category_id', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.category') ]), 'data-ajax--url' => route('ajax-list', ['type' => 'category']), ]) }}
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.subcategory') ]).'',['class'=>'form-control-label'],false) }}
{{ Form::select('subcategory_id', [optional($servicepackage->subcategory)->id => optional($servicepackage->subcategory)->name], optional($servicepackage->subcategory)->id, [ 'class' => 'select2js form-group subcategory', 'id' => 'subcategory_id', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.subcategory') ]), ]) }}
{{ Form::label('name', __('messages.select_name',[ 'select' => __('messages.service') ]).' *',['class'=>'form-control-label'],false) }}
{{ Form::select('service_id[]', $services ? $services->pluck('name', 'id') : [], $selectedServiceId, [ 'class' => 'select2js form-group service_id', 'id' =>'custom_service_id', 'multiple' => 'multiple', 'data-placeholder' => __('messages.select_name',[ 'select' => __('messages.service') ]), 'required' => 'required', ]) }}
{{ Form::label('start_at',__('messages.start_at').'',['class'=>'form-control-label'], false ) }} {{ Form::text('start_at',old('start_at'),['placeholder' => __('messages.start_at'),'class' =>'form-control min-datetimepicker']) }}
{{ Form::label('end_at',__('messages.end_at').'',['class'=>'form-control-label'], false ) }} {{ Form::text('end_at',old('end_at'),['placeholder' => __('messages.end_at'),'class' =>'form-control min-datetimepicker']) }}
{{ Form::label('price',__('messages.price').' *',['class'=>'form-control-label'],false) }} {{ Form::number('price',null, [ 'min' => 1, 'step' => 'any' , 'placeholder' => __('messages.price'),'class' =>'form-control', 'required','id' => 'price' ]) }}
{{ Form::label('status',trans('messages.status').' *',['class'=>'form-control-label'],false) }} {{ Form::select('status',['1' => __('messages.active') , '0' => __('messages.inactive') ],old('status'),[ 'id' => 'role' ,'class' =>'form-control select2js','required']) }}
{{ Form::label('description',trans('messages.description'), ['class' => 'form-control-label']) }} {{ Form::textarea('description', null, ['class'=>"form-control textarea" , 'rows'=>3 , 'placeholder'=> __('messages.description') ]) }}
@if(getMediaFileExit($servicepackage, 'package_attachment')) @php $attchments = $servicepackage->getMedia('package_attachment'); $file_extention = config('constant.IMAGE_EXTENTIONS'); @endphp

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

@foreach($attchments as $attchment )