@if (Auth()->user()->type_user != 'owner')
@include('error.404')
@dd()
@else
@extends('layouts.owner.master')
@section('title', 'Tableau de bord')
@section('content')
@php
$subscription = auth()->user()->subscription;
$isTrial = $subscription
&& $subscription->status === 'trial'
&& now()->lt($subscription->trial_ends_at);
@endphp
@if($isTrial)
ESSAI GRATUIT ACTIF —
Expire le {{ \Carbon\Carbon::parse($subscription->trial_ends_at)->format('d/m/Y') }}
@endif
Commandes totales
{{ $totalCommandes }}
Commandes en cours
{{ $commandesEnCours }}
Clients
{{ $totalClients }}
Chiffre d'affaire hebdomadaire
{{ money($chiffreAffaire) }}
@foreach($recentCommandes as $cmd)
{{ $cmd->reference }}
{{ $cmd->client->fullname ?? '-' }}
{{ money($cmd->amount_commandes ?? 0) }}
@endforeach
@if($alertesCommandes->count() > 0)
@foreach($alertesCommandes as $cmd)
{{ $cmd->reference }}
{{ $cmd->client->fullname ?? '-' }}
{{ \Carbon\Carbon::parse($cmd->end_date)->translatedFormat('d M') }}
J-{{ now()->diffInDays($cmd->end_date) }}
@endforeach
@else
✔ Aucune alerte
@endif
@endsection
@endif