{{-- Org profile list card. Mobile: vertical — logo top, info below. Desktop: horizontal — logo left (fixed width), info right (2-column grid). Required: $org — App\Models\OrgProfile (with 'user' relation loaded) --}} @php $about = $org->about_me ? \Illuminate\Support\Str::limit(strip_tags($org->about_me), 140) : null; $supportForOpts = \App\Models\ProProfile::supportForOptions(); $tgOpts = \App\Models\ProProfile::targetGroupOptions(); $supportBadges = []; foreach (array_slice($org->support_for ?? [], 0, 4) as $key) { if ($lbl = $supportForOpts[$key] ?? null) $supportBadges[] = __($lbl); } $supportExtra = max(0, count($org->support_for ?? []) - 4); $tgBadges = []; foreach (array_slice($org->target_groups ?? [], 0, 4) as $key) { if ($lbl = $tgOpts[$key] ?? null) $tgBadges[] = __($lbl); } $tgExtra = max(0, count($org->target_groups ?? []) - 4); $actTax = \App\Models\OrgProfile::activityFormTaxonomy(); $actLabels = collect($actTax) ->flatMap(fn($c) => collect($c['tags'])->mapWithKeys(fn($lbl, $slug) => [$slug => $lbl])) ->all(); $actPills = []; foreach ($actTax as $cat) { $catSlugs = array_keys($cat['tags']); if (array_intersect($catSlugs, $org->activity_forms ?? [])) { $actPills[] = ['emoji' => $cat['emoji'], 'label' => $cat['label']]; if (count($actPills) >= 4) break; } } $actExtra = max(0, count(array_unique(array_merge(...array_map( fn($p) => array_filter(array_keys($actLabels), fn($s) => in_array($s, $org->activity_forms ?? [])), $actPills ?: [[]] )))) - count($actPills)); @endphp @php $isDraft = !$org->is_visible && auth()->id() === $org->user_id; @endphp @if ($isDraft)
✏️ {{ __('Draft — not visible yet') }} {{ __('Edit & publish →') }}
{{-- spacer for the banner --}} @endif {{-- ── Logo kolom ───────────────────────────────────────────────── --}}
@if ($org->logoUrl()) {{ $org->organization_name }} @else
🏢
@endif
{{-- ── Info kolom ────────────────────────────────────────────────── --}}
{{-- LINKS: naam · kernactiviteit · locatie · regio's --}}

{{ $org->organization_name }}

@if ($org->isVerified()) {{ __('Verified') }} @endif
@if ($org->core_activity)

{{ $org->core_activity }}

@endif @if ($org->city || $org->country)

📍 {{ collect([$org->city, $org->country])->filter()->implode(', ') }}

@endif @if (!empty($org->operating_regions)) @php $regionOpts = \App\Models\OrgProfile::operatingRegionOptions(); @endphp
@foreach (array_slice($org->operating_regions, 0, 3) as $r) @if ($rlbl = $regionOpts[$r] ?? null) {{ $rlbl }} @endif @endforeach @if (count($org->operating_regions) > 3) +{{ count($org->operating_regions) - 3 }} @endif
@endif
{{-- RECHTS: ondersteunt · doelgroep · activiteiten --}}
@if ($supportBadges)

{{ __('Supports') }}

@foreach ($supportBadges as $badge) {{ $badge }} @endforeach @if ($supportExtra > 0) +{{ $supportExtra }} @endif
@endif @if ($tgBadges)

{{ __('Target group') }}

@foreach ($tgBadges as $badge) {{ $badge }} @endforeach @if ($tgExtra > 0) +{{ $tgExtra }} @endif
@endif @if ($actPills)

{{ __('Activities') }}

@foreach ($actPills as $pill) {{ $pill['emoji'] }} {{ __($pill['label']) }} @endforeach
@endif
{{-- About snippet --}} @if ($about)

{{ $about }}

@endif