@extends('layouts.app') @section('title', 'Geo Report') @section('content') {{-- Fixed Top Action Bar --}}
Geo Report
{{-- Filters Section --}}
{{-- Content Row --}}
Geo Variation Analysis
@if(!request()->has('view_all')) View All @else Show Paginated @endif
@foreach($headers as $header) @endforeach @forelse($visits as $row) @php // Gradient Logic: 0-50m: green/normal, 50-100m: yellow/orange, >100m: red $var = $row->variation; $bgStyle = ''; $textClass = ''; if ($var !== null) { if ($var > 100) { // Dark Red $bgStyle = 'background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%); color: white;'; } elseif ($var > 50) { // Orange to Yellow $bgStyle = 'background: linear-gradient(135deg, #f59e0b 0%, #fbbf24 100%); color: white;'; } else { // Light Green $bgStyle = 'background: linear-gradient(135deg, #a7f3d0 0%, #34d399 100%); color: #064e3b;'; } } @endphp @empty @endforelse
{{ $header }}
{{ $row->date }} {{ $row->full_name }} {{ $row->market }} {{ $row->outlet_name }} {{ $row->checked_in_time }} {{ $row->checked_out_time }} {{ $row->outlet_geo }} {{ $row->checked_in_geo }} @if($var !== null) {{ $row->formatted_variation }} @else - @endif
No data available for this view.
@endsection @push('js') @endpush