@extends('layouts.app') @section('content')
Welcome to your single Mail Dashboard
{{ $insightSummary }}
@endifAssigned by hand: the routing rule sends {{ $insightCategory['label'] ?? 'this category' }} to {{ $assignRouted->displayName() }}, but {{ $assignedByName ?? 'somebody' }} assigned this one {{ $assignToName ? 'to ' . $assignToName : 'to ' . ($assignDept?->displayName() ?? 'another team') }}. A hand-assigned mail is never reassigned automatically.
@elseif ($assignDeptId === 0 && $assignRouted)
Not assigned yet: {{ $insightCategory['label'] ?? 'This category' }} is routed to
{{ $assignRouted->displayName() }}, but this mail was classified before the rule existed or its
assignment was cleared. php artisan mail:assign-existing gives mail like this its team.
Nobody owns this: {{ $insightCategory['label'] ?? 'this category' }} is not routed to a team. @if (auth()->check() && auth()->user()->auth_id == 0) Map it on the Mail Routing screen and new mail of this kind is assigned as it arrives. @endif
@endif {{-- Reassign. Anybody in the account may reassign, not just the admin: the person who knows a mail landed in the wrong queue is usually whoever it landed on. Changing the RULE stays an admin action — one mail is not a policy. --}} @if ($assignTeams->isNotEmpty()) @endif @if ($insightLeadIs && $insightReason !== '')Why this is a lead: {{ $insightReason }}
@endif @if ($insightDemoted) {{-- Only the surprising case is spelled out. A band that matches its type needs no explanation beyond the pill; a band one step below its type looks like a mistake until you know the score is what moved it. --}}Why {{ strtolower($insightBandDef['label']) }} and not {{ strtolower(\App\Models\LeadType::priorityDefinitionFor($insightOwnBand)['label']) }}: {{ $insightLead['label'] }} is normally {{ strtolower(\App\Models\LeadType::priorityDefinitionFor($insightOwnBand)['label']) }} priority, but the classifier scored this mail {{ $insightScore }} against a floor of {{ $insightLead['min_score'] }} — inside the {{ \App\Models\LeadType::CONFIDENCE_MARGIN }}-point margin where it only just believed its own answer — so it is shown one band lower.
@endif