@php /** @var \TCG\Voyager\Models\DataType $dataType */ /** @var \Illuminate\Database\Eloquent\Model $dataTypeContent */ $edit = !is_null($dataTypeContent->getKey()); $add = is_null($dataTypeContent->getKey()); // Convenience accessors (match your column names) $row = $dataTypeContent; // Pre-computed helpers you used before: $fundsPaidOptions = fundsPaid(); // returns [key => label] $selectedFundsPaid = $row->funds_paid ? explode(',', $row->funds_paid) : []; $showProductType = in_array('3', $selectedFundsPaid) || count($selectedFundsPaid) > 1; $showPartial = in_array('3', $selectedFundsPaid); @endphp @extends('voyager::master') @section('css') @stop @section('page_title', __('voyager::generic.'.($edit ? 'edit' : 'add')).' '.$dataType->getTranslatedAttribute('display_name_singular')) @section('page_header')

{{ __('voyager::generic.'.($edit ? 'edit' : 'add')).' '.$dataType->getTranslatedAttribute('display_name_singular') }}

@include('voyager::multilingual.language-selector') @stop @section('content')
@if($edit) {{ method_field("PUT") }} @endif {{ csrf_field() }}
@if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif {{-- Top meta --}}
{{-- Funds agreed with inline edit (admin) --}}
@php $paidOn = $row->paid_on ? \Carbon\Carbon::createFromTimestamp($row->paid_on)->format('Y-m-d') : ''; @endphp
{{-- Bank details (readonly) --}}
{{-- Upload ID images (file/camera selector UI hooks) --}}
{{-- render existing images --}}
@foreach(($row->id_images ?? []) as $img) {{-- map this accessor in model --}} @endforeach
{{-- Signature preview --}} @if(!empty($row->signature))

@endif {{-- Funds payment method + conditional sections --}}
{{-- Partial amounts repeater --}}
@php $partials = $row->priceHistory ?? []; // accessor returning [{id,price}] @endphp @forelse($partials as $i => $p)
@if($i===0) @else @endif
@empty
@endforelse
{{-- Message to customer (TinyMCE is already wired in your admin layout) --}}
{{-- Email action buttons (wire these to your controller endpoints or AJAX) --}}

{{ $row->more_info_email ? timeFormat($row->more_info_email) : '' }}

{{ $row->paid_fund_email ? timeFormat($row->paid_fund_email) : '' }}
{{-- Voyager media delete modal (kept as-is) --}}
@stop @section('javascript') @stop