add metrics

This commit is contained in:
ludo
2024-01-30 23:24:00 +01:00
parent c0c4146c9c
commit 79af996c63
12 changed files with 226 additions and 70 deletions

View File

@@ -1,17 +1,10 @@
<x-card title="Aperçu de l'activité">
<div class="counter">
<span class="index">Paniers Actifs</span>
<div class="value float-right">40</div>
</div>
<div>
<span class="text-muted">dans les 30 dernières minutes</span>
</div>
<x-card title="Etat des commandes" class="dashtable" classBody="p-1 bg-light">
<table class="table table-stripped counter w-100">
<tr>
<td class="index">Commandes</td>
<td class="value text-right">{{ $orders_count }}</td>
<td class="index">Commandes en attente</td>
<td class="value text-right">{{ $waitingOrders ?? 0 }}</td>
</tr>
<tr>
<td class="index">En préparation depuis moins de 24h</td>
@@ -46,8 +39,12 @@
</table>
</x-card>
<x-card title="Suivi des stocks" class="dashtable" classBody="p-1 bg-light">
<x-card title="Suivi des offres & stocks" class="dashtable" classBody="p-1 bg-light">
<table class="table table-stripped counter w-100">
<tr>
<td class="index">Offres disponibles</td>
<td class="value float-right">{{ $offers_count ?? 0 }}</td>
</tr>
<tr>
<td class="index">Stock critique</td>
<td class="value float-right">{{ $stocksWarning ?? 0 }}</td>
@@ -58,8 +55,8 @@
<x-card title="Clients et suivi client" class="dashtable" classBody="p-1 bg-light">
<table class="table table-stripped counter w-100">
<tr>
<td class="index">Nouveaux clients</td>
<td class="value float-right">{{ $newClients ?? 0 }}</td>
<td class="index">Clients</td>
<td class="value float-right">{{ $countCustomers ?? 0 }}</td>
</tr>
</table>
</x-card>

View File

@@ -1,4 +1,11 @@
<div class="row">
<div class="col-sm-3 col-xs-6">
<div class="description-block">
<span class="description-percentage text-red"><i class="fa fa-caret-down"></i> 18%</span>
<h5 class="description-header">{{ $orders_count ?? 0 }}</h5>
<span class="description-text">NB COMMANDES</span>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<span class="description-percentage text-green"><i class="fa fa-caret-up"></i> 17%</span>
@@ -16,15 +23,8 @@
<div class="col-sm-3 col-xs-6">
<div class="description-block border-right">
<span class="description-percentage text-green"><i class="fa fa-caret-up"></i> 20%</span>
<h5 class="description-header">{{ $clients_count ?? 0 }}</h5>
<h5 class="description-header">{{ $countClients ?? 0 }}</h5>
<span class="description-text">NB CLIENTS</span>
</div>
</div>
<div class="col-sm-3 col-xs-6">
<div class="description-block">
<span class="description-percentage text-red"><i class="fa fa-caret-down"></i> 18%</span>
<h5 class="description-header">{{ $offers_count ?? 0 }}</h5>
<span class="description-text">NB OFFRES</span>
</div>
</div>
</div>

View File

@@ -1,42 +1,63 @@
<div class="card">
<div class="card-header">
<h3 class="card-title">Dernières commandes</h3>
<div class="card-header">
<h3 class="card-title">Dernières commandes</h3>
<div class="card-tools">
<button type="button" class="btn btn-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<!-- /.box-header -->
<div class="card-body">
<div class="table-responsive">
<table class="table no-margin">
<thead>
<tr>
<th>Nom</th>
<th>Localisation</th>
<th>Date</th>
<th>Montant</th>
</tr>
</thead>
<tbody>
<tr>
<td><a href="pages/examples/invoice.html">Ludovic CANDELLIER</a></td>
<td>Amiens (80)</td>
<td>14/05/2020</td>
<td><span class="label label-success">300.53 </span></td>
</tr>
</tbody>
</table>
</div>
<!-- /.table-responsive -->
</div>
<!-- /.box-body -->
<div class="card-header clearfix">
<a href="javascript:void(0)" class="btn btn-sm btn-info btn-flat pull-left">Nouvelle commande</a>
<a href="javascript:void(0)" class="btn btn-sm btn-default btn-flat pull-right">Voir toutes les commandes</a>
</div>
<!-- /.box-footer -->
<div class="card-tools">
<button type="button" class="btn btn-tool" data-widget="collapse"><i class="fa fa-minus"></i>
</button>
<button type="button" class="btn btn-tool" data-widget="remove"><i class="fa fa-times"></i></button>
</div>
</div>
<div class="card-body">
<div class="table-responsive">
<table class="table no-margin">
<thead>
<tr>
<th>Nom</th>
<th>Localisation</th>
<th>Date</th>
<th class="text-right">Montant</th>
<th></th>
</tr>
</thead>
<tbody>
@if (count($lastOrders))
@foreach ($lastOrders as $order)
<tr>
<td>
<a href="{{ route('Admin.Shop.Customers.edit', ['id' => $order->customer->id]) }}"
class="alert-link green">
{{ $order->customer->first_name }}
{{ $order->customer->last_name }}
</a>
</td>
<td>{{ $order->customer->city }} ({{ substr($order->customer->zipcode, 0, 2) }})</td>
<td>{{ Carbon\Carbon::parse($order->created_at)->format('d/m/Y H:i') }}</td>
<td class="text-right font-weight-bold">
{{ $order->total_shipped }}
</td>
<td class="text-right">
<a href="{{ route('Admin.Shop.Orders.edit', ['id' => $order->id]) }}">
<button class="btn btn-sm btn-success"><i class="fa fa-eye"></i></button>
</a>
</td>
</tr>
@endforeach
@endif
</tbody>
</table>
</div>
<!-- /.table-responsive -->
</div>
<!-- /.box-body -->
<div class="card-header clearfix">
<a href="{{ route('Admin.Shop.Orders.create') }}" class="btn btn-sm btn-info btn-flat pull-left">
Nouvelle commande
</a>
<a href="{{ route('Admin.Shop.Orders.index') }}" class="btn btn-sm btn-default btn-flat pull-right">
Voir toutes les commandes
</a>
</div>
<!-- /.box-footer -->
</div>
<!-- /.box -->