@extends('admin.layouts.app') @section('title', $person->last_name . ' ' . $person->first_name) @section('header', $person->last_name . ' ' . $person->first_name) @section('breadcrumb') {{ __('people.title') }} / {{ $person->last_name }} {{ $person->first_name }} @endsection @section('header-actions') {{ __('common.edit') }}
@csrf @method('DELETE')
@endsection @section('content')
@if($person->photo)
@else
{{ strtoupper(substr($person->first_name, 0, 1)) }}
@endif

{{ $person->last_name }} {{ $person->first_name }}

{{ $person->email ?? '—' }}

@php $sc = ['member'=>'badge-primary','supporter'=>'badge-success','donor'=>'badge-warning','volunteer'=>'badge-info','vip'=>'badge-purple','prospect'=>'badge-secondary','inactive'=>'badge-secondary']; @endphp
{{ __('people.status.' . $person->status) }}
{{ __('common.data') }}
@foreach([ [__('common.phone'), $person->phone], [__('common.city'), $person->city], [__('people.subscribed_label'), $person->is_subscribed ? __('common.yes') : __('common.no')], [__('people.source'), $person->source], [__('common.registered'), $person->created_at->format('Y. m. d.')], ] as [$label, $value])
{{ $label }} {{ $value ?? '—' }}
@endforeach
{{ __('people.total_donated') }} {{ number_format($person->total_donated, 0, ',', ' ') }} Ft
@if($person->notes)

{{ __('common.notes') }}

{{ $person->notes }}

@endif
{{-- ── LEAD SCORING CARD ────────────────────────── --}} @php $leadStages = [ 'new' => ['label' => 'Új érdeklődő', 'color' => '#6c757d', 'icon' => 'M12 4v16m8-8H4'], 'contacted' => ['label' => 'Kapcsolatba lépve', 'color' => '#299cdb', 'icon' => 'M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z'], 'qualified' => ['label' => 'Minősített', 'color' => '#7a5af8', 'icon' => 'M9 12l2 2 4-4m6 2a9 9 0 11-18 0 9 9 0 0118 0z'], 'proposal' => ['label' => 'Ajánlat küldve', 'color' => '#f7b84b', 'icon' => 'M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2'], 'converted' => ['label' => 'Megnyert', 'color' => '#0ab39c', 'icon' => 'M5 13l4 4L19 7'], 'lost' => ['label' => 'Elveszett', 'color' => '#f06548', 'icon' => 'M6 18L18 6M6 6l12 12'], ]; $currentStage = $person->lead_stage; $currentScore = $person->lead_score; @endphp
Kapcsolatfelvétel / Értékelés
@csrf @method('PATCH') {{-- Pipeline stages --}}
@foreach($leadStages as $val => $stage) @php $active = $currentStage === $val; @endphp @endforeach
{{-- Star score --}}
@for($i = 1; $i <= 5; $i++) @endfor @if($currentScore) {{ $currentScore }}/5 — @switch($currentScore) @case(1) Hideg @break @case(2) Langyos @break @case(3) Érdeklődő @break @case(4) Forró @break @case(5) Nagyon forró @break @endswitch @else Nincs értékelve @endif
@if($currentStage || $currentScore) @endif
{{-- ── ACTIVITY LOG ──────────────────────────────── --}} @php $activityMeta = [ 'call' => ['label'=>'Telefonhívás', 'color'=>'#0ab39c', 'bg'=>'rgba(10,179,156,0.12)', 'icon'=>''], 'email' => ['label'=>'Email', 'color'=>'#405189', 'bg'=>'rgba(64,81,137,0.12)', 'icon'=>''], 'meeting' => ['label'=>'Megbeszélés', 'color'=>'#7a5af8', 'bg'=>'rgba(122,90,248,0.12)', 'icon'=>''], 'note' => ['label'=>'Feljegyzés', 'color'=>'#f7b84b', 'bg'=>'rgba(247,184,75,0.12)', 'icon'=>''], 'task' => ['label'=>'Feladat', 'color'=>'#299cdb', 'bg'=>'rgba(41,156,219,0.12)', 'icon'=>''], 'sms' => ['label'=>'SMS', 'color'=>'#f06548', 'bg'=>'rgba(240,101,72,0.12)', 'icon'=>''], 'other' => ['label'=>'Egyéb', 'color'=>'#6c757d', 'bg'=>'rgba(108,117,125,0.12)', 'icon'=>''], ]; @endphp
Aktivitás napló {{ $activities->count() }} bejegyzés
{{-- Add activity form --}}
@csrf
{{-- Timeline --}} @if($activities->isEmpty())
Még nincs aktivitás bejegyezve ennél a kapcsolatnál.
@else
{{-- Vertical line --}}
@foreach($activities as $act) @php $m = $activityMeta[$act->type] ?? $activityMeta['other']; @endphp
{{-- Icon dot --}}
{!! $m['icon'] !!}
{{-- Content --}}
{{ $m['label'] }} {{ $act->occurred_at->format('Y. m. d. H:i') }} @if($act->user) · {{ $act->user->name }} @endif
@csrf @method('DELETE')
@if($act->notes)

{{ $act->notes }}

@endif
@endforeach
@endif
{{-- ── DONATIONS ──────────────────────────────────── --}}
{{ __('donations.title') }}
@forelse($person->donations as $donation) @empty @endforelse
{{ __('donations.col_amount') }} {{ __('common.status') }} {{ __('donations.col_method') }} {{ __('common.date') }}
{{ number_format($donation->amount, 0, ',', ' ') }} {{ $donation->currency }} {{ __('donations.status.' . $donation->status) }} {{ $donation->payment_method ? __('donations.method.' . $donation->payment_method) : '—' }} {{ $donation->created_at->format('Y. m. d.') }}
{{ __('donations.none') }}
{{ __('groups.title') }}
@forelse($person->groups as $group) @empty @endforelse
{{ __('groups.col_name') }} {{ __('common.type') }} {{ __('groups.col_privacy') }}
{{ $group->name }} {{ __('groups.type.' . $group->type) }} {{ __('groups.privacy.' . $group->privacy) }}
{{ __('people.no_groups') }}
@endsection @push('scripts') @endpush