{{ __('app.common.back') }} @if (session('success'))

{{ session('success') }}

@endif @if ($errors->any()) @endif
@csrf @if ($client->exists) @method('PUT') @endif
{{ mb_substr($client->first_name ?: '?', 0, 1) }}

{{ $client->exists ? $client->name : __('crm.clients.new') }}

@if ($client->exists)

{{ __('crm.clients.since') }} {{ $client->created_at->format('d.m.Y') }}

@endif

{{ __('crm.clients.details') }}

@php $fields = [ 'first_name' => [__('crm.clients.first_name'), 'text', 255, true], 'last_name' => [__('crm.clients.last_name'), 'text', 255, false], 'email' => [__('app.common.email'), 'email', 255, true], 'phone' => [__('app.common.phone'), 'text', 50, false], 'company' => [__('crm.clients.company'), 'text', 255, false], 'vat' => [__('crm.clients.vat'), 'text', 50, false], 'address' => [__('crm.clients.address'), 'text', 255, false], 'city' => [__('crm.clients.city'), 'text', 255, false], 'post_code' => [__('crm.clients.post_code'), 'text', 30, false], ]; @endphp @foreach ($fields as $name => [$label, $type, $max, $required]) @endforeach
@adminCan('visits.view')

{{ __('crm.clients.recent_visits') }}

{{ __('clients.newest_first') }}
@if ($client->exists) @forelse ($visits as $visit) {{ $visit->service_date->format('d.m.Y') }} · {{ substr($visit->start_time, 0, 5) }} – {{ substr($visit->end_time, 0, 5) }} {{ $visit->location?->label ? $visit->location->label.' · ' : '' }}{{ $visit->address }} · {{ $visit->staff }} {{ __('performed.statuses.'.$visit->status) }} {{ number_format($visit->price, 2, ',', ' ') }} лв. @empty

{{ __('clients.no_visits') }}

@endforelse @if ($visits->hasPages()) @endif @else

{{ __('clients.save_first') }}

@endif
@endadminCan @if ($client->exists)

{{ __('clients.property') }}

@foreach (['label' => __('clients.property_name'), 'address' => __('crm.clients.address'), 'city' => __('crm.clients.city'), 'post_code' => __('crm.clients.post_code')] as $field => $label) @endforeach
@endif @push('styles')@endpush @push('scripts')@endpush