@extends('template.desktop.app') @section('title', 'Dashboard Order') @push('styles') @endpush @section('content')
{{-- HEADER --}}
Dashboard

Order Overview

Monitoring performa order dan pengiriman secara real-time

Update {{ now()->format('d M Y • H:i') }}
{{-- STAT CARDS ROW --}}
{{-- Total Pengiriman --}}
Total Pengiriman
{{ number_format($totalShipments) }}
{{ number_format($fulfillmentRate, 1) }}% selesai
{{-- Dalam Proses --}}
Dalam Proses
{{ number_format($inProcessCount) }}
aktif
{{-- Total Destinasi --}}
Total Destinasi
{{ number_format($totalDestinations) }}
kota tujuan
{{-- Return --}}
Retur
{{ number_format($rtsCount) }}
{{ number_format($riskRate, 1) }}% rate
{{-- CHARTS ROW --}}
{{-- Performance Chart --}}
Performa Pengiriman
{{ number_format($totalShipments) }} {{ number_format($fulfillmentRate, 1) }}%
Selesai
Transit
Pending
Retur
{{-- Breakdown Donut --}}
Distribusi Status
Total
{{ number_format($totalShipments) }}
Selesai ({{ $totalShipments > 0 ? number_format(($completedShipments / $totalShipments) * 100, 0) : 0 }}%)
{{ number_format($completedShipments) }}
Dalam Proses ({{ $totalShipments > 0 ? number_format(($inProcessCount / $totalShipments) * 100, 0) : 0 }}%)
{{ number_format($inProcessCount) }}
Pending ({{ $totalShipments > 0 ? number_format(($countPending / max($totalShipments, 1)) * 100, 0) : 0 }}%)
{{ number_format($countPending) }}
Retur ({{ $totalShipments > 0 ? number_format(($rtsCount / $totalShipments) * 100, 0) : 0 }}%)
{{ number_format($rtsCount) }}
{{-- METRIC CARDS ROW --}}
{{-- Revenue --}}
Revenue
Rp {{ number_format($totalRevenue / 1000000, 1, ',', '.') }}M
COD
{{ number_format($codRevenue / 1000000, 1, ',', '.') }}M
Transfer
{{ number_format($transferRevenue / 1000000, 1, ',', '.') }}M
{{-- Capital --}}
Modal Aktif
Rp {{ number_format($marketingCapital / 1000000, 1, ',', '.') }}M
Draft
{{ number_format($capitalDraft / 1000000, 1, ',', '.') }}M
Cair
{{ number_format($capitalSettled / 1000000, 1, ',', '.') }}M
{{-- Fulfillment --}}
Fulfillment
{{ number_format($completedShipments) }}
Success Rate {{ number_format($fulfillmentRate, 1) }}%
{{-- Risk --}}
Risk Exposure
{{ number_format($rtsCount) }}
{{ number_format($riskRate, 1) }}%
Rate
Lost Value
Rp {{ number_format($rtsValue, 0, ',', '.') }}
{{-- RECENT ORDERS TABLE --}}
Aktivitas Order Terbaru
@foreach ($recentOrders as $ro) @php $st = strtoupper($ro['status']); $pc = 'pill-muted'; $sl = $ro['status']; if ($st === 'COMPLETED') { $pc = 'pill-ok'; $sl = 'Selesai'; } elseif ( in_array($st, [ 'IN PROCESS', 'WITH DELIVERY COURIER', 'ONGOING TO RECEIVER', 'ARRIVED AT DESTINATION CITY', ]) ) { $pc = 'pill-prog'; $sl = 'Transit'; } elseif (in_array($st, ['RETURN', 'RTS', 'RETURN TO SENDER', 'IN PROCESS RETURN'])) { $pc = 'pill-ret'; $sl = 'Retur'; } elseif (in_array($st, ['WAITING FOR DELIVERY', 'APPROVED', 'REPEAT DELIVERY'])) { $pc = 'pill-wait'; $sl = 'Pending'; } @endphp @endforeach
Order ID Origin Destinasi Kurir Status Sumber Tanggal Pembayaran Total
{{ $ro['id'] }} {{ $ro['sender_city'] }} {{ $ro['receiver_city'] }} {{ $ro['logistic'] }} {{ $sl }} @if (strtolower($ro['source']) === 'everpro') Everpro @elseif(strtolower($ro['source']) === 'marketplace') Marketplace @else {{ $ro['source'] }} @endif {{ $ro['date'] }} {{ $ro['payment'] }} Rp {{ number_format($ro['total'], 0, ',', '.') }}
@endsection @push('scripts') @endpush