49 lines
2.1 KiB
PHP
49 lines
2.1 KiB
PHP
@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
|
|
$workdays = 260;
|
|
if (strpos($index, '2021') !== false) {
|
|
$workdays = 105;
|
|
}
|
|
$sum = 0;
|
|
@endphp
|
|
@foreach ($stat as $data)
|
|
<tr style="background-color: {{ CellType::make($data->activity->value)->value }};">
|
|
<td><b>{{ $data->activity->label }}</b></td>
|
|
<td><b>{{ $data->nb / Config::get('schedules.daySlots') }}</b></td>
|
|
<td>{{ round((($data->nb / Config::get('schedules.daySlots')) / $workdays) * 100) }}%</td>
|
|
</tr>
|
|
@php $sum += $data->nb; @endphp
|
|
@endforeach
|
|
<tr>
|
|
<td><b>{{ __('Total') }}</b></td>
|
|
<td><b>{{ $sum / Config::get('schedules.daySlots') }} / {{ $workdays }}</b></td>
|
|
<td><b>{{ round((($sum / 8) / $workdays) * 100) }}%</b></td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
@endforeach
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
@endsection
|