2022-02-09 13:11:29 +00:00
|
|
|
@extends('layout.app')
|
|
|
|
|
|
|
|
|
|
@section('content')
|
|
|
|
|
<div class="container">
|
|
|
|
|
<div class="row justify-content-center">
|
|
|
|
|
<div class="col-md-8">
|
|
|
|
|
<div class="card">
|
|
|
|
|
<div class="card-header">{{ __('Statistiques') }}</div>
|
|
|
|
|
|
|
|
|
|
<div class="card-body">
|
|
|
|
|
@foreach ($stats as $index => $stat)
|
|
|
|
|
<table class="table">
|
|
|
|
|
<thead class="table-dark">
|
|
|
|
|
<tr>
|
|
|
|
|
<th>{{ $index }}</th>
|
|
|
|
|
<th>{{ __('Jour(s)') }}</th>
|
|
|
|
|
<th>%</th>
|
|
|
|
|
</tr>
|
|
|
|
|
</thead>
|
|
|
|
|
<tbody>
|
|
|
|
|
@php
|
2022-02-11 11:13:54 +01:00
|
|
|
$workdays = 260;
|
2022-02-09 13:11:29 +00:00
|
|
|
if (strpos($index, '2021') !== false) {
|
2022-02-11 11:13:54 +01:00
|
|
|
$workdays = 105;
|
2022-02-09 13:11:29 +00:00
|
|
|
}
|
|
|
|
|
$sum = 0;
|
|
|
|
|
@endphp
|
|
|
|
|
@foreach ($stat as $data)
|
|
|
|
|
<tr style="background-color: {{ CellType::make($data->activity->value)->value }};">
|
|
|
|
|
<td><b>{{ $data->activity->label }}</b></td>
|
2022-03-08 11:38:07 +01:00
|
|
|
<td><b>{{ $data->nb / Config::get('schedules.daySlots') }}</b></td>
|
|
|
|
|
<td>{{ round((($data->nb / Config::get('schedules.daySlots')) / $workdays) * 100) }}%</td>
|
2022-02-09 13:11:29 +00:00
|
|
|
</tr>
|
|
|
|
|
@php $sum += $data->nb; @endphp
|
|
|
|
|
@endforeach
|
|
|
|
|
<tr>
|
|
|
|
|
<td><b>{{ __('Total') }}</b></td>
|
2022-03-08 11:38:07 +01:00
|
|
|
<td><b>{{ $sum / Config::get('schedules.daySlots') }} / {{ $workdays }}</b></td>
|
|
|
|
|
<td><b>{{ round((($sum / 8) / $workdays) * 100) }}%</b></td>
|
2022-02-09 13:11:29 +00:00
|
|
|
</tr>
|
|
|
|
|
</tbody>
|
|
|
|
|
</table>
|
|
|
|
|
@endforeach
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
2022-03-08 11:38:07 +01:00
|
|
|
@endsection
|