@php
$eur = fn ($amount) => number_format((float) $amount, 2, ',', ' ') . ' €';
$serviceColors = [
'chauffeurs' => '#0f766e',
'sur_mesure' => '#C3AD66',
'vendor' => '#3b82f6',
'major_vendor' => '#6366f1',
'restaurant' => '#ef4444',
'rental' => '#0ea5e9',
];
@endphp
{{-- Viki Global Administration --}}
{{ __('dashboard.global_title') }}
{{ __('messages.admin_steering') }}
{{ now()->format('d/m/Y') }}
@foreach ([
['label' => __('dashboard.global_revenue'), 'value' => $eur($globalRevenue), 'hint' => __('dashboard.global_revenue_hint'), 'color' => '#10b981'],
['label' => __('dashboard.payout'), 'value' => $eur($globalPayout), 'hint' => __('dashboard.payout_hint'), 'color' => '#0ea5e9'],
['label' => __('messages.commission_viki'), 'value' => $eur($commissionViki), 'hint' => __('dashboard.commission_hint'), 'color' => '#6366f1'],
['label' => __('dashboard.global_orders'), 'value' => $globalOrdersCount, 'hint' => $globalPaidOrdersCount . ' ' . __('messages.orders_paid'), 'color' => '#3b82f6'],
['label' => __('dashboard.global_products'), 'value' => $globalProductsCount, 'hint' => __('dashboard.global_products_hint', ['products' => $productsCount, 'custom' => $customProductsCount, 'dishes' => $dishesCount, 'houses' => $maisonsCount]), 'color' => '#f59e0b'],
['label' => __('messages.humanitarian'), 'value' => $eur($humanitaire), 'hint' => __('messages.humanitarian_percent'), 'color' => '#10b981'],
['label' => __('messages.donations'), 'value' => $eur($dons), 'hint' => __('messages.donations_total'), 'color' => '#f59e0b'],
['label' => __('dashboard.boxtal'), 'value' => $eur($shippingTotal), 'hint' => __('messages.transport_shipping'), 'color' => '#3b82f6'],
] as $tile)
{{ $tile['label'] }}
{{ $tile['value'] }}
{{ $tile['hint'] }}
@endforeach
{{-- Support Global Administration --}}
{{ __('dashboard.support_title') }}
@foreach ($supportMessages as $channel => $support)
@endforeach
{{-- Administration tous services --}}
{{ __('dashboard.services_title') }}
@foreach ($services as $service => $figures)
{{ __('dashboard.service_' . $service) }}
@foreach ([
['label' => __('dashboard.service_total'), 'value' => $figures['total']],
['label' => __('dashboard.service_payout'), 'value' => $figures['payout']],
['label' => __('dashboard.service_commission'), 'value' => $figures['commission']],
] as $tile)
{{ $tile['label'] }}
{{ $eur($tile['value']) }}
@endforeach
@endforeach
{{-- Graph + marketplace health --}}
{{ __('messages.average_rating') }}
{{ $averageRating }}/5
{{ $reviewsCount }} {{ __('messages.reviews_count') }}
{{ __('messages.favorite_products') }}
{{ $wishlistCount }}
{{ __('messages.favorites') }}
{{ __('messages.promo_codes') }}
{{ $activePromoCodesCount }}
{{ __('messages.marketing') }}
{{ __('messages.small_accounts') }}
{{ __('messages.buyers') }} : {{ $smallBuyersCount }}
{{ __('messages.sellers') }} : {{ $smallVendorsCount }}
{{ __('messages.large_accounts') }}
{{ __('messages.buyers') }} : {{ $majorBuyersCount }}
{{ __('messages.sellers') }} : {{ $majorVendorsCount }}
{{ __('messages.hosts') }}
{{ __('messages.number_of_hosts') }}
{{ $loueursCount }}
{{ __('surmesure.admin_makers') }}
{{ __('surmesure.admin_makers_count') }}
{{ $customMakersCount ?? 0 }}
{{ __('messages.restaurateurs') }}
{{ __('messages.number_of_restaurants') }}
{{ $restaurateursCount ?? 0 }}
{{ __('messages.drivers') }}
{{ __('messages.number_of_drivers') }}
{{ $chauffeursCount ?? 0 }}
{{-- Tables --}}
| {{ __('messages.order_number') }} |
{{ __('messages.buyer') }} |
{{ __('messages.total') }} |
{{ __('messages.payment') }} |
{{ __('messages.status') }} |
@forelse($latestOrders as $order)
|
{{ $order->order_number }}
|
{{ $order->buyer?->name ?? '—' }} |
{{ number_format($order->total, 2, ',', ' ') }} € |
{{ $order->payment_status }}
|
{{ $order->status }}
|
@empty
|
{{ __('messages.no_recent_orders') }}
|
@endforelse
@forelse($latestProducts as $product)
@php
$translator = app(\App\Services\TranslationService::class);
$locale = app()->getLocale();
@endphp
@php $translatedName = $translator->translate($product->product_name, $locale); @endphp {{ $translatedName }}
{{ $product->seller?->name ?? __('messages.unknown_seller') }}
{{ number_format($product->final_price, 2, ',', ' ') }} €
@empty
{{ __('messages.no_recent_products') }}
@endforelse
{{-- Dernières maisons --}}
@forelse($latestMaisons as $maison)
@php
$ownerName = trim((optional($maison->owner)->first_name ?? '') . ' ' . (optional($maison->owner)->last_name ?? ''))
?: optional($maison->owner)->name;
@endphp
{{ $maison->title ?: '#' . $maison->id }}
{{ $maison->city ? $maison->city . ' • ' : '' }}{{ $ownerName ?: '-' }}
{{ number_format($maison->price, 2, ',', ' ') }} {{ currency_symbol($maison->currency) }}
{{ __('messages.per_night') }}
@empty
{{ __('messages.no_recent_houses') }}
@endforelse
{{-- Dernières créations sur mesure --}}
@forelse($latestCustomProducts as $creation)
{{ $creation->product_name }}
{{ $creation->seller?->company ?: ($creation->seller?->name ?? '-') }}
@if($creation->production_delay_days)
• {{ $creation->production_delay_days }} {{ __('surmesure.days') }}
@endif
{{ number_format($creation->final_price, 2, ',', ' ') }} {{ currency_symbol($creation->currency) }}
{{ __('surmesure.pricing_' . $creation->pricing_mode) }}
@empty
{{ __('surmesure.dashboard_no_recent_creation') }}
@endforelse
{{-- Derniers plats --}}
@forelse($latestDishes as $dish)
@php $dishPhoto = $dish->firstPhotoPath(); @endphp
{{ $dish->name }}
{{ $dish->restaurateur?->company ?: ($dish->restaurateur?->name ?? '-') }}
@if($dish->category)
• {{ $dish->category }}
@endif
{{ number_format($dish->price, 2, ',', ' ') }} {{ currency_symbol($dish->currency) }}
{{ $dish->is_available ? __('restaurant.available') : __('restaurant.unavailable') }}
@empty
{{ __('messages.no_recent_dishes') }}
@endforelse
{{-- Dernières courses --}}
@forelse($latestRides as $ride)
@php
$driver = $ride->chauffeur;
$driverName = $driver?->company ?: trim(($driver?->first_name ?? '') . ' ' . ($driver?->last_name ?? '')) ?: ($driver?->name ?? '-');
$rideStatus = $ride->displayStatus();
$rideAmount = $ride->amountDue();
@endphp
@if($ride->isMealDelivery())
@else
@endif
{{ $driverName }}
{{ $ride->pickup_address }}@if($ride->dropoff_address) → {{ $ride->dropoff_address }}@endif
@if($ride->isImmediate())
{{ __('chauffeur.booking_mode_now') }}
@else
{{ $ride->scheduled_at?->format('d.m.Y H:i') }}
@endif
• {{ __('messages.requested_on') }} {{ $ride->created_at->format('d.m.Y') }}
{{ $rideAmount ? number_format($rideAmount, 2, ',', ' ') . ' ' . currency_symbol($ride->currency) : '—' }}
{{ __('chauffeur.booking_status_' . $rideStatus) }}
@empty
{{ __('messages.no_recent_rides') }}
@endforelse
{{-- World Map Visitors --}}