flexisip-account-manager/flexiapi/resources/views/admin/statistics/show.blade.php
Timothée Jaussoin ec3f123c9a Various UI fixes
2023-08-03 16:07:25 +00:00

58 lines
2.5 KiB
PHP

@extends('layouts.main')
@section('breadcrumb')
<li class="breadcrumb-item active" aria-current="page">Statistics</li>
@endsection
@section('content')
<header>
<h1><i class="material-icons">analytics</i> Statistics</h1>
</header>
@include('parts.tabs', [
'items' => [
route('admin.statistics.show', ['type' => 'messages']) => 'Messages',
route('admin.statistics.show', ['type' => 'accounts']) => 'Accounts',
],
])
<div>
<form class="inline" method="POST" action="{{ route('admin.statistics.edit') }}" accept-charset="UTF-8">
@csrf
@method('post')
<input type="hidden" name="by" value="{{ $by }}">
<input type="hidden" name="type" value="{{ $type }}">
<div>
<input type="date" name="from" value="{{ $request->get('from') }}" onchange="this.form.submit()">
<label for="from">From</label>
</div>
<div>
<input type="date" name="to" value="{{ $request->get('to') }}" onchange="this.form.submit()">
<label for="to">To</label>
</div>
<div>
<a href="{{ route('admin.statistics.show', ['by' => 'day', 'type' => $type] + $request->only(['from', 'to'])) }}"
class="chip @if ($by == 'day') selected @endif">Day</a>
<a href="{{ route('admin.statistics.show', ['by' => 'week', 'type' => $type] + $request->only(['from', 'to'])) }}"
class="chip @if ($by == 'week') selected @endif">Week</a>
<a href="{{ route('admin.statistics.show', ['by' => 'month', 'type' => $type] + $request->only(['from', 'to'])) }}"
class="chip @if ($by == 'month') selected @endif">Month</a>
<a href="{{ route('admin.statistics.show', ['by' => 'year', 'type' => $type] + $request->only(['from', 'to'])) }}"
class="chip @if ($by == 'year') selected @endif">Year</a>
</div>
<div class="oppose">
<a class="btn btn-secondary" href="{{ route('admin.statistics.show') }}">Reset</a>
<a class="btn btn-tertiary"
href="{{ route('admin.statistics.show', ['by' => $by, 'type' => $type, 'export' => true] + $request->only(['from', 'to'])) }}">
<i class="material-icons">download</i> Export
</a>
</div>
</form>
</div>
@include('parts.graph')
@endsection