@extends('layouts.app') @section('page-title', 'Mon Tableau de Bord') @section('page-subtitle', 'Mes performances et gains') @section('content')
👋 Bonjour, {{ $equipe->name }}!
{{ $equipe->magasin ?? 'N/A' }} • {{ $equipe->service ?? 'N/A' }}
💰 Gains ce mois: {{ number_format($currentMonthEarnings, 2) }} MAD
Type de paiement
@if($equipe->type_paiement === 'Commission') 📊 Commission {{ $equipe->commission_rate }}% @else 💵 Salaire Fixe @endif
Cette semaine Ce mois Cette année Tout
Statistiques du Jour
📦 Total Commandes
{{ $todayStats['total'] }}
Aujourd'hui
✅ Confirmées
{{ $todayStats['confirmed'] }}
Revenue: {{ number_format($todayStats['revenue'], 2) }} MAD
❌ Annulées
{{ $todayStats['cancelled'] }}
{{ $todayStats['total'] > 0 ? round(($todayStats['cancelled'] / $todayStats['total']) * 100, 1) : 0 }}% du total
⏳ En Attente
{{ $todayStats['pending'] }}
À traiter
Performance du Mois
📊 Total Commandes
{{ $monthlyStats['total'] }}
Ce mois-ci
✅ Taux de Confirmation
{{ $monthlyStats['total'] > 0 ? round(($monthlyStats['confirmed'] / $monthlyStats['total']) * 100, 1) : 0 }}%
💰 Revenu Total
{{ number_format($monthlyStats['revenue'], 2) }} MAD
@if($equipe->type_paiement === 'Commission')
Commission: {{ number_format(($monthlyStats['revenue'] * $equipe->commission_rate) / 100, 2) }} MAD
@endif
💵 Mes Gains
{{ number_format($currentMonthEarnings, 2) }} MAD
@if($equipe->type_paiement === 'Commission') {{ $equipe->commission_rate }}% de commission @else Salaire fixe @endif
Évolution des Performances
@if($equipe->type_paiement === 'Commission' && count($commissionDetails) > 0)
Détails des Commissions
@foreach($commissionDetails as $detail) @endforeach
# Client Produit Total Commande Taux Ma Commission Date
#{{ $detail['order_id'] }} {{ $detail['client_name'] }} {{ $detail['product_name'] }} {{ number_format($detail['total'], 2) }} MAD {{ $detail['commission_rate'] }}% {{ number_format($detail['commission_amount'], 2) }} MAD {{ $detail['date']->format('d/m/Y') }}
Total: {{ number_format($earnings['commission_amount'], 2) }} MAD
@endif @if(count($recentOrders) > 0)
Commandes Récentes
@foreach($recentOrders as $order) @endforeach
# Client Produit Quantité Total Statut Date
#{{ $order->id }} {{ $order->client_name }} {{ $order->product_name }} {{ $order->quantity }} {{ number_format($order->total, 2) }} MAD @if($order->status === 'confirmed') ✅ Confirmée @elseif($order->status === 'cancelled') ❌ Annulée @else ⏳ En attente @endif {{ $order->created_at->format('d/m/Y H:i') }}
@endif @endsection @push('scripts') @endpush