@php $grid = $this->activityGrid; $activeDays = collect($grid)->where('bytes', '>', 0)->count(); $gridTotal = collect($grid)->sum('bytes'); $gridPeak = max(1, collect($grid)->max('bytes')); @endphp
{{-- Lifecycle: the story of the account in the order it happened. --}}
{{ __('Subscription lifecycle') }}

{{ __('Account events from signup to now') }}

    @if ($stats['first_seen'])
  • {{ __('Account created') }} {{ __('Joined via :router', ['router' => $this->sessions->last()?->router?->router_name ?: __('the portal')]) }}
    {{ $stats['first_seen']->format('M j, Y, g:i A') }}
  • @endif @php $firstPaid = $this->sessions->where('amount', '>', 0)->last(); @endphp @if ($firstPaid)
  • {{ __('First payment') }} {{ __('Subscription activated') }} · {{ money($firstPaid->amount, 0) }}
    {{ $firstPaid->created_at->format('M j, Y, g:i A') }}
  • @endif @php $firstConn = $this->connections->last(); @endphp @if ($firstConn?->started_at)
  • {{ __('First session') }} {{ __('Connected to the network') }}
    {{ $firstConn->started_at->format('M j, Y, g:i A') }}
  • @endif @if ($stats['last_seen'])
  • {{ $stats['is_live'] ? __('Online now') : __('Last session') }} {{ $stats['is_live'] ? __('Live · :for', ['for' => $stats['live_since']?->diffForHumans(null, true, true)]) : __('Most recent connection') }}
    {{ $stats['last_seen']->format('M j, Y, g:i A') }}
  • @endif @if (! $stats['first_seen'] && ! $stats['last_seen'])
  • {{ __('Nothing recorded yet.') }}
  • @endif
{{-- A year of activity at a glance. Each square is a day. --}}
{{ __('Activity · last 365 days') }}

{{ __(':days active days · :bytes total transferred', [ 'days' => $activeDays, 'bytes' => bytes_human($gridTotal), ]) }}

{{ __('Less') }} @foreach ([0.08, 0.28, 0.55, 1] as $step) @endforeach {{ __('More') }}
@foreach ($grid as $day) @php // Square root keeps one heavy day from flattening // the rest of the year into invisibility. $weight = $day['bytes'] > 0 ? max(0.12, sqrt($day['bytes'] / $gridPeak)) : 0; @endphp 0) style="background: rgba(33,208,122,{{ round($weight, 2) }});" @endif title="{{ $day['date'] }} — {{ bytes_human($day['bytes']) }}"> @endforeach
{{-- Everything an operator reads out over the phone. --}}
{{ __('Device & network') }}
@if ($this->devices->first()) {{ $this->devices->first()->mac }} @endif
{{ __('Router') }}
{{ $current?->router?->router_name ?: '—' }}
{{ __('IP address') }}
{{ $live?->ip_address ?: ($this->devices->first()->ip ?? '—') }}
{{ __('MAC') }}
{{ $this->devices->first()->mac ?? ($current?->mac_address ?: '—') }}
{{ __('Type') }}
{{ __('Hotspot') }}
{{ __('Username') }}
{{ $current?->username ?: '—' }}
{{ __('Password') }}
•••• {{ $current?->password ?: '—' }}
{{-- The last couple of things we said to them. --}}
{{ __('Communications') }}
@forelse ($this->messages->take(2) as $m)
{{ $m->status === 'sent' ? __('Sent') : __('Failed') }} {{ $m->created_at->format('h:i A') }}

{{ $m->body }}

@empty
{{ __('Nothing sent yet.') }}
@endforelse
{{ __('Reference') }}
{{ __('Account ID') }}
#{{ $current?->id }}
{{ __('Phone') }}
{{ $current?->phone ?: '—' }}
{{ __('Acquired via') }}
{{ ucfirst($current?->source ?: 'portal') }}