{!! Form::label('name', __('labels.product.form.name')) !!} * {!! Form::text('name', old('name', $data['product']->name ?? ''), ['class' => 'form-control', 'required']) !!} @if ($errors->has('name'))
{{ $errors->first('name') }}
@endif
{!! Form::label('category', __('labels.product.form.category')) !!} * @if ($errors->has('category_id'))
{{ $errors->first('category_id') }}
@endif
{!! Form::label('brand', __('labels.product.form.brand')) !!} * @if ($errors->has('brand_id'))
{{ $errors->first('brand_id') }}
@endif
{!! Form::label('prescription_fee', __('labels.product.form.prescription_fee')) !!} * {!! Form::number('prescription_fee', old('prescription_fee', $data['product']->prescription_fee ?? ''), ['class' => 'form-control', 'required', 'min' => '0', 'step' => '1']) !!} @if ($errors->has('prescription_fee'))
{{ $errors->first('prescription_fee') }}
@endif
{!! Form::label('product_price', __('labels.product.form.amnt')) !!} * {!! Form::number('product_price', old('product_price', $data['product']->product_price ?? ''), ['class' => 'form-control', 'required', 'min' => '0', 'step' => '1']) !!} @if ($errors->has('product_price'))
{{ $errors->first('product_price') }}
@endif
{!! Form::label('strength_unit', __('labels.product.form.Str_type')) !!} * {!! Form::text('strength_unit', old('strength_unit', $data['product']->strength_unit ?? ''), ['class' => 'form-control', 'required']) !!} @if ($errors->has('strength_unit'))
{{ $errors->first('strength_unit') }}
@endif
{!! Form::label('questions', __('labels.product.form.questions')) !!} * @if ($errors->has('question_category'))
{{ $errors->first('question_category') }}
@endif
{!! Form::label('prescription', __('labels.product.form.prescription')) !!} * @if ($errors->has('prescription'))
{{ $errors->first('prescription') }}
@endif
{!! Form::label('most_sold_dose', __('labels.product.form.most_sold_dose')) !!} {!! Form::text('most_sold_dose', old('most_sold_dose', $data['product']->most_sold_dose ?? ''), ['class' => 'form-control', 'required']) !!} @if ($errors->has('most_sold_dose'))
{{ $errors->first('most_sold_dose') }}
@endif
{!! Form::label('most_sold_product', __('labels.product.form.most_sold_product')) !!} {!! Form::checkbox('most_sold_product', 1, old('most_sold_product', $data['product']->most_sold_product ?? 0), ['id' => 'most_sold_product']) !!}
{!! Form::label('short_description', __('labels.product.form.short_description')) !!} {!! Form::textarea('short_description', old('short_description', $data['product']->short_description ?? ''), ['id' => 'short_description', 'class' => 'form-control editor-text']) !!} @if ($errors->has('short_description'))
{{ $errors->first('short_description') }}
@endif
{!! Form::label('bullets', __('labels.product.form.bullet')) !!} * @if(isset($data['product']) && !empty($data['product']->bullets)) @forelse($data['product']->bullets as $index => $bullet) @empty @endforelse @else @endif
{{__('labels.product.form.bullet')}} {{__('labels.table.action')}}
@if($errors->has('bullets.' . $index ))
{{ $errors->first('bullets.' . $index ) }}
@endif
@if($errors->has('bullets.0'))
{{ $errors->first('bullets.0') }}
@endif
@if($errors->has('bullets.0'))
{{ $errors->first('bullets.0') }}
@endif
{!! Form::label('description', __('labels.product.form.description')) !!} {!! Form::textarea('description', old('description', $data['product']->description ?? ''), ['id' => 'description', 'class' => 'form-control editor-text']) !!} @if ($errors->has('description'))
{{ $errors->first('description') }}
@endif
{{Form::label('images', __('labels.product.form.images'))}} * (Max. 5 Images)
@if ($errors->has('product_images'))
{{ $errors->first('product_images') }}
@endif
{!! Form::label('is_active', __('labels.product.form.active')) !!} * {!! Form::checkbox('is_active', 1, old('is_active', $data['product']->is_active ?? 1), ['id' => 'is_active']) !!} @if ($errors->has('is_active'))
{{ $errors->first('is_active') }}
@endif
{!! Form::label('is_featured', __('labels.product.form.feature')) !!} {!! Form::checkbox('is_featured', 1, old('is_featured', $data['product']->is_featured ?? 1), ['id' => 'is_featured']) !!} @if ($errors->has('is_featured'))
{{ $errors->first('is_featured') }}
@endif
{{__('labels.product.form.variant')}}
@if(isset($data['product']) && $data['product']->variants) @forelse($data['product']->variants as $index => $variant) @empty @endforelse @else @endif
{{ __('labels.product.form.pcode') }} {{ __('labels.product.form.quantity') }} {{ __('labels.product.form.strength') }} {{ __('labels.product.form.amount') }} {{ __('labels.product.form.purchase_price') }} {{ __('labels.table.action') }}
@if($errors->has('variants.' . $index . '.pcode'))
{{ $errors->first('variants.' . $index . '.pcode') }}
@endif
@if($errors->has('variants.' . $index . '.quantity'))
{{ $errors->first('variants.' . $index . '.quantity') }}
@endif
@if($errors->has('variants.' . $index . '.strength'))
{{ $errors->first('variants.' . $index . '.strength') }}
@endif
@if($errors->has('variants.' . $index . '.amount'))
{{ $errors->first('variants.' . $index . '.amount') }}
@endif
@if($errors->has('variants.' . $index . '.purchase_price'))
{{ $errors->first('variants.' . $index . '.purchase_price') }}
@endif
@if($errors->has('variants.0.pcode'))
{{ $errors->first('variants.0.pcode') }}
@endif
@if($errors->has('variants.0.quantity'))
{{ $errors->first('variants.0.quantity') }}
@endif
@if($errors->has('variants.0.strength'))
{{ $errors->first('variants.0.strength') }}
@endif
@if($errors->has('variants.0.amount'))
{{ $errors->first('variants.0.amount') }}
@endif
@if($errors->has('variants.0.purchase_price'))
{{ $errors->first('variants.0.purchase_price') }}
@endif
@if($errors->has('variants.0.pcode'))
{{ $errors->first('variants.0.pcode') }}
@endif
@if($errors->has('variants.0.quantity'))
{{ $errors->first('variants.0.quantity') }}
@endif
@if($errors->has('variants.0.strength'))
{{ $errors->first('variants.0.strength') }}
@endif
@if($errors->has('variants.0.amount'))
{{ $errors->first('variants.0.amount') }}
@endif
@if($errors->has('variants.0.purchase_price'))
{{ $errors->first('variants.0.purchase_price') }}
@endif

{{__('labels.product.form.documents')}}
@if(isset($data['product']) && $data['product']->documents) @foreach($data['product']->documents as $index => $document) @endforeach @else @endif
{{ __('labels.product.form.document_name') }} {{ __('labels.product.form.document_file') }} {{ __('labels.table.action') }}
@if($document->file_path) {{ __('View') }} @endif

{{ __('Product information') }}
{{__('labels.product.form.product_description')}} {!! Form::textarea('product_description', old('product_description', isset($data['product']) && $data['product']->productInfo ? $data['product']->productInfo->product_description : ''), ['class' => 'form-control editor-text', 'id'=>'product_description']) !!}
{{__('labels.product.form.dosage')}} {!! Form::textarea('dosage', old('dosage', isset($data['product']) && $data['product']->productInfo ? $data['product']->productInfo->dosage : ''), ['class' => 'form-control editor-text', 'id'=>'dosage']) !!}
{{__('labels.product.form.side_effects')}} {!! Form::textarea('side_effects', old('side_effects', isset($data['product']) && $data['product']->productInfo ? $data['product']->productInfo->side_effects : ''), ['class' => 'form-control editor-text', 'id'=>'side_effects']) !!}
{{__('labels.product.form.ingredients')}} {!! Form::textarea('ingredients', old('ingredients', isset($data['product']) && $data['product']->productInfo ? $data['product']->productInfo->ingredients : ''), ['class' => 'form-control editor-text', 'id'=>'ingredients']) !!}
{{__('labels.product.form.contraindications')}} {!! Form::textarea('pil', old('pil', isset($data['product']) && $data['product']->productInfo ? $data['product']->productInfo->pil : ''), ['class' => 'form-control editor-text', 'id'=>'pil']) !!}
{{ __('Product Meta Details') }}
{{__('labels.product.form.meta_title')}} {!! Form::text('meta_title', old('meta_title', isset($data['product']) && $data['product']->meta_title ? $data['product']->meta_title : ''), ['class' => 'form-control editor-text', 'id'=>'meta_title']) !!}
{{__('labels.product.form.meta_description')}} {!! Form::textarea('meta_description', old('meta_description', isset($data['product']) && $data['product']->meta_description ? $data['product']->meta_description : ''), ['class' => 'form-control editor-text', 'id'=>'meta_description']) !!}