@extends('layouts.app')
@section('content')
{{ $board['audience'] }}
@if ($board['services'])
{{ $board['services']['scope'] }}
@endif
@if ($board['services'])
@include('dashboard.partials.stat', ['icon' => 'bi-clipboard-data', 'tone' => 'primary', 'label' => __('dashboard.total'), 'value' => $board['services']['total'], 'href' => route('services.index')])
@include('dashboard.partials.stat', ['icon' => 'bi-hourglass-split', 'tone' => 'warning', 'label' => __('dashboard.open'), 'value' => $board['services']['open'], 'href' => route('services.index', ['scope' => 'open'])])
@include('dashboard.partials.stat', ['icon' => 'bi-check2-circle', 'tone' => 'success', 'label' => __('dashboard.closed'), 'value' => $board['services']['closed'], 'href' => route('services.index', ['scope' => 'closed'])])
@include('dashboard.partials.stat', ['icon' => 'bi-exclamation-triangle', 'tone' => 'danger', 'label' => __('dashboard.overdue'), 'value' => $board['services']['overdue'], 'href' => route('services.index', ['scope' => 'overdue'])])
@include('dashboard.partials.chart', ['title' => __('dashboard.by_status'), 'id' => 'chart-status', 'chart' => $board['charts']['status'], 'allowEmpty' => false])
@include('dashboard.partials.chart', ['title' => __('dashboard.by_month'), 'id' => 'chart-months', 'chart' => $board['charts']['months'], 'allowEmpty' => true])
| {{ __('dashboard.number') }} |
{{ __('dashboard.record_title') }} |
{{ __('dashboard.customer') }} |
{{ __('dashboard.status') }} |
@forelse ($board['services']['recent'] as $record)
| {{ $record['number'] }} |
{{ $record['title'] }} |
{{ $record['customer'] }} |
{{ $record['status'] }} |
@empty
| {{ __('dashboard.no_services') }} |
@endforelse
@endif
@if ($board['stock'])
{{ __('dashboard.stock') }}
@include('dashboard.partials.stat', ['icon' => 'bi-box-seam', 'tone' => 'primary', 'label' => __('dashboard.warehouses'), 'value' => $board['stock']['warehouses'], 'href' => auth()->user()->can('warehouses.view') ? route('warehouses.index') : route('stock.index')])
@include('dashboard.partials.stat', ['icon' => 'bi-tag', 'tone' => 'info', 'label' => __('dashboard.products'), 'value' => $board['stock']['products'], 'href' => auth()->user()->can('products.view') ? route('products.index') : route('stock.index')])
@include('dashboard.partials.stat', ['icon' => 'bi-boxes', 'tone' => 'success', 'label' => __('dashboard.quantity'), 'value' => $board['stock']['quantity'], 'href' => route('stock.index')])
@include('dashboard.partials.stat', ['icon' => 'bi-exclamation-circle', 'tone' => 'danger', 'label' => __('dashboard.low'), 'value' => $board['stock']['low'], 'href' => route('stock.index')])
@include('dashboard.partials.chart', ['title' => __('dashboard.by_warehouse'), 'id' => 'chart-warehouses', 'chart' => $board['charts']['warehouses'], 'allowEmpty' => false])
@include('dashboard.partials.chart', ['title' => __('dashboard.top_products'), 'id' => 'chart-products', 'chart' => $board['charts']['products'], 'allowEmpty' => false])
@if ($board['stock']['low_rows'] !== [])
| {{ __('common.name') }} |
{{ __('dashboard.quantity') }} |
{{ __('dashboard.minimum') }} |
@foreach ($board['stock']['low_rows'] as $row)
| {{ $row['name'] }} |
{{ $row['quantity'] }} |
{{ $row['minimum'] }} |
@endforeach
@endif
@endif
@if ($board['customers'] || $board['transfers'])
@if ($board['customers'])
@include('dashboard.partials.stat', ['icon' => 'bi-buildings', 'tone' => 'secondary', 'label' => __('dashboard.customers'), 'value' => $board['customers']['mains'], 'href' => route('customers.index'), 'wide' => true])
@include('dashboard.partials.stat', ['icon' => 'bi-diagram-3', 'tone' => 'secondary', 'label' => __('dashboard.branches'), 'value' => $board['customers']['branches'], 'href' => route('customers.index'), 'wide' => true])
@include('dashboard.partials.chart', ['title' => __('dashboard.by_customer'), 'id' => 'chart-customers', 'chart' => $board['charts']['customers'], 'allowEmpty' => false])
@endif
@if ($board['transfers'])
{{ __('dashboard.transfers') }}
@include('dashboard.partials.stat', ['icon' => 'bi-hourglass', 'tone' => 'warning', 'label' => __('dashboard.pending'), 'value' => $board['transfers']['pending'], 'href' => route('transfers.index'), 'wide' => true])
@include('dashboard.partials.stat', ['icon' => 'bi-truck', 'tone' => 'info', 'label' => __('dashboard.dispatched'), 'value' => $board['transfers']['dispatched'], 'href' => route('transfers.index'), 'wide' => true])
@include('dashboard.partials.stat', ['icon' => 'bi-check2-all', 'tone' => 'success', 'label' => __('dashboard.completed'), 'value' => $board['transfers']['completed'], 'href' => route('transfers.index'), 'wide' => true])
@endif
@endif
@if ($board['mail'])
@include('dashboard.partials.stat', ['icon' => 'bi-envelope-check', 'tone' => 'success', 'label' => __('dashboard.mail_sent'), 'value' => $board['mail']['sent'], 'href' => route('mail.index')])
@include('dashboard.partials.stat', ['icon' => 'bi-envelope-x', 'tone' => 'danger', 'label' => __('dashboard.mail_failed'), 'value' => $board['mail']['failed'], 'href' => route('mail.index')])
@endif
@if (! $board['services'] && ! $board['stock'] && ! $board['customers'] && ! $board['transfers'] && ! $board['mail'])
{{ __('dashboard.empty') }}
@endif
@endsection
@push('scripts')
@endpush