@extends('layouts.app') @section('title', 'Compliance – Gap Finder Analytics') @section('content')
Deviation scores per MR for the selected period.
@if ($hasNoVisitsInDb ?? false)php artisan visits:classify to compute territory status. After that, compliance scores will appear here.
| MR | Score | Band | Visits | In primary | In secondary | Outside | Border | |
|---|---|---|---|---|---|---|---|---|
| {{ $mrs->get($mrId)?->name ?? 'MR #'.$mrId }} | {{ $s['score'] }} | @if ($s['band'] === 'high') high @elseif ($s['band'] === 'medium') medium @else low @endif | {{ $s['total_visits'] }} | {{ $s['in_primary'] }} | {{ $s['in_secondary'] }} | {{ $s['outside'] }} | {{ $s['border_ambiguous'] }} | Details |
| @if ($hasNoVisitsInDb ?? false) Import visits from Imports, then map and classify. @elseif ($hasVisitsButNoneInRange ?? false) Widen the date range above to include visit dates. @else No visits in this period. @endif | ||||||||