@extends('layouts.app', ['class' => 'g-sidenav-show bg-gray-100']) {{-- section content --}} @section('content') @include('layouts.navbars.auth.topnav', ['title' => ''])
Result {{ $title_menu }}

{{-- Top Customer Ranking & Charts Tabs --}} @if(!empty($top_customers)) {{-- Tab Navigation --}} {{-- Tab Content --}}
{{-- Industrial Tab --}}
@if(!empty($top_customers['industrial']['customers']))
Top 10 Customers - {{ $top_customers['industrial']['category_name'] }}
@foreach($top_customers['industrial']['periods'] as $period) @php $monthNames =[ '001' => 'Jan', '002' => 'Feb', '003' => 'Mar', '004' => 'Apr', '005' => 'May', '006' => 'Jun', '007' => 'Jul', '008' => 'Aug', '009' => 'Sep', '010' => 'Oct', '011' => 'Nov', '012' => 'Dec' ]; $monthName = $monthNames[$period] ?? $period; @endphp @endforeach @foreach($top_customers['industrial']['periods'] as $period) @endforeach @foreach(array_slice($top_customers['industrial']['customers'], 0, 10) as $customer) @foreach($top_customers['industrial']['periods'] as $period) @endforeach @endforeach
Rank Customer Name{{ $monthName }} {{ $selected_year }}
Sales (kg) Amount (USD) Avg Price
{{ $customer['rank'] }} {{ $customer['customer_name'] }}{{ number_format($customer['monthly_data'][$period]['sales_kg'] ?? 0, 2) }} {{ number_format($customer['monthly_data'][$period]['amount_usd'] ?? 0, 2) }} {{ number_format($customer['monthly_data'][$period]['avg_price'] ?? 0, 2) }}
{{-- Table Controls --}}
Jan

Showing Top 10 Customers

@endif {{-- Industrial Chart --}} @if(!empty($chart_data['industrial']))
Price Trend Bubble Chart ({{ $chart_data['year'] }})
Industrial Division
{{-- Player Controls --}}
Jan
@endif
{{-- Hygiene & Medical Tab --}}
@if(!empty($top_customers['hygiene_medical']['customers']))
Top 10 Customers - {{ $top_customers['hygiene_medical']['category_name'] }}
@foreach($top_customers['hygiene_medical']['periods'] as $period) @php $monthNames =[ '001' => 'Jan', '002' => 'Feb', '003' => 'Mar', '004' => 'Apr', '005' => 'May', '006' => 'Jun', '007' => 'Jul', '008' => 'Aug', '009' => 'Sep', '010' => 'Oct', '011' => 'Nov', '012' => 'Dec' ]; $monthName = $monthNames[$period] ?? $period; @endphp @endforeach @foreach($top_customers['hygiene_medical']['periods'] as $period) @endforeach @foreach(array_slice($top_customers['hygiene_medical']['customers'], 0, 10) as $customer) @foreach($top_customers['hygiene_medical']['periods'] as $period) @endforeach @endforeach
Rank Customer Name{{ $monthName }} {{ $selected_year }}
Sales (kg) Amount (USD) Avg Price
{{ $customer['rank'] }} {{ $customer['customer_name'] }}{{ number_format($customer['monthly_data'][$period]['sales_kg'] ?? 0, 2) }} {{ number_format($customer['monthly_data'][$period]['amount_usd'] ?? 0, 2) }} {{ number_format($customer['monthly_data'][$period]['avg_price'] ?? 0, 2) }}
{{-- Table Controls --}}
Jan

Showing Top 10 Customers

@endif {{-- Hygiene & Medical Chart --}} @if(!empty($chart_data['hygiene_medical']))
Price Trend Bubble Chart ({{ $chart_data['year'] }})
Hygiene & Medical Division
{{-- Player Controls --}}
Jan
@endif
{{-- Transaction Detail Modal --}} {{-- Hidden data for JavaScript --}} @endif
{{-- check flag js on dmenu --}} @if ($jsmenu == '1') @if (view()->exists("js.{$dmenu}")) @push('addjs') {{-- file js in folder (resources/views/js) --}} @include('js.' . $dmenu); @endpush @else @push('addjs') @endpush @endif @endif @endsection @push('css') @endpush @push('js') {{-- ECharts Library --}} @endpush