ultimatepos/Modules/Portal/Resources/views/customer/dashboard/index.blade.php

64 lines
3.5 KiB
PHP

@extends('portal::layouts.customer')
@section('title', __('portal::lang.nav_home'))
@section('content')
<section class="portal-page-header">
<h1>{{ __('portal::lang.welcome_user', ['name' => Session::get('user.first_name')]) }}</h1>
<p>@lang('portal::lang.customer_portal')</p>
</section>
<section class="content portal-dashboard">
<div class="portal-stat-grid">
<div class="portal-stat-card portal-stat-card--blue">
<div class="portal-stat-card__icon"><i class="fas fa-shopping-cart"></i></div>
<div class="portal-stat-card__body">
<span class="portal-stat-card__label">@lang('portal::lang.total_sale')</span>
<strong class="portal-stat-card__value display_currency" data-currency_symbol="true">{{ $contact->total_invoice }}</strong>
</div>
</div>
<div class="portal-stat-card portal-stat-card--green">
<div class="portal-stat-card__icon"><i class="fas fa-check-circle"></i></div>
<div class="portal-stat-card__body">
<span class="portal-stat-card__label">@lang('portal::lang.total_sale_paid')</span>
<strong class="portal-stat-card__value display_currency" data-currency_symbol="true">{{ $contact->invoice_received }}</strong>
</div>
</div>
<div class="portal-stat-card portal-stat-card--orange">
<div class="portal-stat-card__icon"><i class="fas fa-exclamation-circle"></i></div>
<div class="portal-stat-card__body">
<span class="portal-stat-card__label">@lang('portal::lang.total_sale_due')</span>
<strong class="portal-stat-card__value display_currency" data-currency_symbol="true">{{ $contact->total_invoice - $contact->invoice_received }}</strong>
</div>
</div>
</div>
@if(!empty($maintenanceStats))
<div class="portal-page-header" style="margin-top:24px;">
<h2 style="font-size:18px;margin:0 0 8px;">@lang('portal::lang.maintenance_hub')</h2>
<p><a href="{{ action([\Modules\Portal\Http\Controllers\Customer\MaintenanceHubController::class, 'index']) }}">@lang('portal::lang.view_details') &rarr;</a></p>
</div>
<div class="portal-stat-grid">
<div class="portal-stat-card portal-stat-card--blue">
<div class="portal-stat-card__icon"><i class="fas fa-wrench"></i></div>
<div class="portal-stat-card__body">
<span class="portal-stat-card__label">@lang('portal::lang.open_work_orders')</span>
<strong class="portal-stat-card__value">{{ $maintenanceStats['open_work_orders'] ?? 0 }}</strong>
</div>
</div>
<div class="portal-stat-card portal-stat-card--green">
<div class="portal-stat-card__icon"><i class="fas fa-calendar-check"></i></div>
<div class="portal-stat-card__body">
<span class="portal-stat-card__label">@lang('portal::lang.upcoming_services')</span>
<strong class="portal-stat-card__value">{{ $maintenanceStats['upcoming_services'] ?? 0 }}</strong>
</div>
</div>
<div class="portal-stat-card portal-stat-card--orange">
<div class="portal-stat-card__icon"><i class="fas fa-cogs"></i></div>
<div class="portal-stat-card__body">
<span class="portal-stat-card__label">@lang('portal::lang.my_equipment')</span>
<strong class="portal-stat-card__value">{{ $maintenanceStats['equipment'] ?? 0 }}</strong>
</div>
</div>
</div>
@endif
</section>
@endsection