@php $tz = config('app.display_timezone'); $parts = \App\Services\Crm\Health\AccountHealth::PARTS; $statusLabel = \App\Services\Crm\Health\AccountHealth::STATUSES; $tone = [ 'risk' => ['chip' => 'bg-rose-50 text-rose-600', 'badge' => 'rose'], 'watch' => ['chip' => 'bg-amber-50 text-amber-600', 'badge' => 'amber'], 'good' => ['chip' => 'bg-emerald-50 text-emerald-600', 'badge' => 'emerald'], 'unknown' => ['chip' => 'bg-slate-100 text-slate-400', 'badge' => 'slate'], ]; $confidenceColor = ['high' => 'emerald', 'medium' => 'sky', 'low' => 'slate']; $statusColor = ['open' => 'slate', 'prompted' => 'amber', 'snoozed' => 'violet', 'converted' => 'emerald', 'dismissed' => 'slate', 'missed' => 'rose']; @endphp
@if (! $assessment) {{ __('Health is worked out for clients we trade with. This organisation has not been invoiced yet.') }} @else {{ $assessment['rule'] }} @if ($organisation->health_checked_at) · {{ __('Saved by the check on :when', ['when' => $organisation->health_checked_at->timezone($tz)->format('j M Y H:i')]) }} @endif @endif
{{ __($parts[$key]['label']) }}
{{ $part['reason'] }}
{{ __('Learnt from this client\'s invoices. The owner is prompted :weeks weeks before an expected order.', ['weeks' => $leadWeeks]) }}
{{ __('Their invoices go back :days days, less than a year, so a yearly pattern cannot be seen yet and none is guessed. Importing their past invoices helps.', ['days' => number_format($historyDays)]) }}
@endif| {{ __('What repeats, and the evidence') }} | {{ __('Expected') }} | {{ __('Typical value') }} | {{ __('Status') }} | {{ __('Actions') }} |
|---|---|---|---|---|
|
{{ $prediction->category_label }}
{{ $prediction->pattern === 'interval' ? __('About every :days days', ['days' => $prediction->interval_days]) : __(\App\Models\Crm\ReorderPrediction::PATTERNS[$prediction->pattern] ?? $prediction->pattern) }}
|
{{ $prediction->expected_on->format('M Y') }} {{ __('around :date', ['date' => $prediction->expected_on->format('j M')]) }} |
@if ($prediction->typical_value_base !== null) {{ trim($baseCode.' '.number_format((float) $prediction->typical_value_base, 2)) }} @else {{ __('Not estimated') }} @endif |
@if ($wasOrdered($prediction))
{{ \Illuminate\Support\Str::after($prediction->dismissed_reason, \App\Services\Crm\Reorders\ReorderService::ORDERED_PREFIX) }} @else{{ __('until :date', ['date' => $prediction->snoozed_until->format('j M')]) }} @elseif ($prediction->status === 'converted' && $prediction->opportunity) {{ $prediction->opportunity->title }} @elseif ($prediction->status === 'dismissed'){{ $prediction->dismissed_reason }}@if ($prediction->actor) · {{ $prediction->actor->name }}@endif @elseif ($prediction->status === 'open' && $prediction->prompt_on->gt($today)){{ __('Prompt on :date', ['date' => $prediction->prompt_on->format('j M')]) }} @endif @endif |
@if ($canActOn($prediction))
@if ($canCreateOpportunity)
@endif
@endif
|
|
|
||||