@php // Mehrere aktive Incentives parallel (E1): Fallback auf die alte Einzelvariable. $dashIncentives = isset($activeIncentives) && $activeIncentives ? $activeIncentives : collect(isset($activeIncentive) && $activeIncentive ? [$activeIncentive] : []); @endphp @foreach ($dashIncentives as $activeIncentive) @php $incentiveParticipant = isset($incentiveParticipants) && $incentiveParticipants ? $incentiveParticipants->get($activeIncentive->id) : ($incentiveParticipant ?? null); $hasConfirmedDash = $incentiveParticipant && $incentiveParticipant->accepted_terms_at !== null; $dashSuffix = '-' . $activeIncentive->id; $dashPayout = $activeIncentive->hasCashPayout() && $incentiveParticipant ? (new \App\Services\Incentive\IncentivePayoutService)->forParticipant($activeIncentive, $incentiveParticipant) : null; @endphp
{{-- Hero-Bild mit Overlay --}} @if ($activeIncentive->image)
{{ $activeIncentive->name }}
{{ $activeIncentive->hasCashPayout() ? __('incentive.badge_challenge') : 'Incentive VIP' }}

{{ $activeIncentive->getLang('name') ?: $activeIncentive->name }}

@if ($activeIncentive->getLang('subtitle'))

{{ $activeIncentive->getLang('subtitle') }}

@endif
@else
{{ $activeIncentive->hasCashPayout() ? __('incentive.badge_challenge') : 'Incentive VIP' }}

{{ $activeIncentive->getLang('name') ?: $activeIncentive->name }}

@if ($activeIncentive->getLang('subtitle'))

{{ $activeIncentive->getLang('subtitle') }}

@endif
@endif {{-- Inhaltsbereich --}}
{{-- Status-Leiste (nur fuer Teilnehmer) --}} @if ($incentiveParticipant)
@if ($incentiveParticipant->rank)
{{ $incentiveParticipant->rank }} {{ __('incentive.your_rank') }}
@endif
{{ number_format($incentiveParticipant->total_points, 0, ',', '.') }} {{ $activeIncentive->ranksByPartnerCount() ? __('incentive.new_partners_short') : __('incentive.points_short') }}
@if ($dashPayout)
{{ \App\Services\Incentive\IncentivePayoutService::formatAmount($dashPayout['total']) }} {{ __('incentive.payout_so_far') }}
@endif
@if ($incentiveParticipant->is_qualified) {{ __('incentive.qualified') }} @else {{ __('incentive.open') }} @endif
@endif {{-- Notice: Teilnahme noch nicht bestÃĪtigt --}} @if (!$hasConfirmedDash)
@if ($incentiveParticipant) {{ __('incentive.dash_notice_unconfirmed_title') }}

{{ __('incentive.dash_notice_unconfirmed_body') }}

@else {{ __('incentive.dash_notice_unregistered_title') }}

{{ __('incentive.dash_notice_unregistered_body') }}

@endif @if ($activeIncentive->isActive()) @endif
@endif {{-- Bilder-Leiste --}} @php $dashGallery = array_slice($activeIncentive->galleryImages(), 0, 4); @endphp @if (count($dashGallery) > 0) @endif {{-- Buttons --}}
{{-- Teilnahme-Modal --}} @if (!$hasConfirmedDash && $activeIncentive->isActive()) @endif @endforeach @if ($dashIncentives->isNotEmpty()) @endif