@extends('admin/layouts/admin') @section('title', __($translatePrefix . '.show.title', ['name' => $item->name])) @section('scripts') @endsection @section('content')
@include('admin/shared/alerts') @if ($errors->any()) @endif

{{ __($translatePrefix . '.show.title', ['name' => $item->name]) }}

{{ __($translatePrefix. '.show.subheading', ['date' => $item->created_at->format('d/m/y')]) }}

@method('PUT') @csrf
@include('admin/shared/input', ['name' => 'name', 'label' => __('global.name'), 'value' => $item->name]) @include('admin/shared/checkbox', ['name' => 'hidden', 'label' => __('global.hidden'), 'checked' => $item->hidden])
@include('admin/shared/search-select-multiple', ['name' => 'products[]', 'label' => __('global.products'), 'value' => old('products[]', $selectedProducts), 'options' => $products, 'multiple' => true])
@include('admin/shared/input', ['name' => 'sort_order', 'label' => __('global.sort_order'), 'value' => $item->sort_order, 'type' => 'number'])
@include('admin/shared/select', ['name' => 'key', 'label' => __('global.key'), 'value' => in_array($item->key, $keys->keys()->toArray()) ? $item->key : 'custom', 'options' => $keys])
@include('admin/shared/input', ['name' => 'custom_key', 'label' => __($translatePrefix .'.fields.custom_key'), 'value' => $item->key])
@include('admin/shared/select', ['name' => 'type', 'label' => __('global.type'), 'options' => $types, 'value' => $item->type])
@include('admin/shared/input', ['name' => 'default_value', 'label' => __($translatePrefix . '.fields.default_value'), 'value' => $item->default_value]) @include('admin/shared/checkbox', ['name' => 'required', 'label' => __($translatePrefix . '.fields.required'), 'checked' => $item->required])
@include('admin/shared/input', ['name' => 'max_value', 'label' => __($translatePrefix . '.fields.max_value'), 'value' => $item->max_value])
@include('admin/shared/input', ['name' => 'min_value', 'label' => __($translatePrefix . '.fields.min_value'), 'value' => $item->min_value])
@include('admin/shared/input', ['name' => 'rules', 'label' => __($translatePrefix . '.fields.rules'), 'value' => $item->rules])
@include('admin/shared/input', ['name' => 'step', 'label' => __($translatePrefix . '.fields.step'), 'value' => $item->step])
@include('admin/shared/input', ['name' => 'unit', 'label' => __($translatePrefix . '.fields.unit'), 'value' => $item->unit])
@if (!in_array($item->type, ['dropdown', 'radio']))
@include('admin/shared/pricing/table') @if ($item->type == 'slider') @if ($item->step > 1) {{ __($translatePrefix . '.per_step', ['step' => $item->step, 'unit' => $item->unit]) }} @else {{ __($translatePrefix . '.per_unit', ['unit' => $item->unit]) }} @endif @endif
@endif
@if (in_array($item->type, ['dropdown', 'radio']))
@csrf

{{ __($translatePrefix . '.show.options.title') }}

    @foreach ($item->options as $option)
  • @include('admin/shared/input', ['name' => 'options[' . $option->id . '][friendly_name]', 'label' => __($translatePrefix . '.show.options.friendly_name'), 'value' => $option->friendly_name])
    @include('admin/shared/input', ['name' => 'options[' . $option->id . '][value]', 'label' => __('global.value'), 'value' => $option->value, 'type' => $item->getFieldType()])
    @include('admin/shared/checkbox', ['name' => 'options[' . $option->id . '][hidden]', 'label' => __('global.hidden'), 'value' => $option->hidden])
    @include('admin/shared/pricing/table',['pricing_key' => "options[" .$option->id ."][pricing]", 'pricing' => $optionsPricing[$option->id]])
  • @endforeach
@endif
@include('admin/shared/pricing/collapse')
@method('PUT') @csrf
@foreach($item->options as $option)
@method('DELETE') @csrf
@endforeach @endsection