@extends('layout') @section('content') @php($points = (int) $affiliate->points_total)
@include('partials.context-back')

{{ $affiliate->name }}

{{ $affiliate->referral_code }} · {{ affiliate_status_label($affiliate->status) }}

edit Editar
groups Clientes convertidos
{{ $affiliate->convertedClientsCount() }}
conversões confirmadas no CRM
stars Pontos disponíveis
{{ $points }}
saldo calculado pelo histórico imutável

Área do afiliado

Acesso separado do painel interno; o convite expira em 60 minutos.

@if ($affiliate->status !== 'ativo') Acesso bloqueado @elseif ($affiliate->portalAccount?->activated_at && !$affiliate->portalAccount?->revoked_at) Acesso ativado @elseif ($affiliate->portalAccount?->invite_token_hash && $affiliate->portalAccount?->invite_expires_at?->isFuture()) Aguardando ativação @elseif ($affiliate->portalAccount?->activated_at) Acesso revogado @elseif ($affiliate->portalAccount) Convite expirado ou inválido @else Sem acesso @endif
@if ($affiliate->status === 'ativo' && $affiliate->email)
@csrf
@else

Para liberar, deixe o afiliado ativo e cadastre um e-mail válido.

@endif

Histórico de pontuação

cada lançamento permanece registrado
@if ($events->isEmpty())
history

Nenhum evento de pontuação.

@else @foreach ($events as $event)
{{ $event->points > 0 ? '+' : '' }}{{ $event->points }} {{ $event->reason }} {{ $event->lead ? 'Lead: '.$event->lead->name.' · ' : '' }}{{ datetime_br($event->created_at, 'd/m/Y H:i') }}@if ($event->createdBy) · por {{ $event->createdBy->name }}@endif
@endforeach @endif
@if ($affiliate->email)
E-mail
{{ $affiliate->email }}
@endif @if ($affiliate->company)
Empresa
{{ $affiliate->company }}
@endif @if ($affiliate->phone)
Telefone
{{ $affiliate->phone }}
@endif @if ($affiliate->client)@endif
Cadastro
{{ datetime_br($affiliate->created_at, 'd/m/Y') }}

Ajuste manual

Use somente para correções justificadas. O registro não é apagado.

@csrf
@endsection