osb/resources/views/theme/backend/adminlte/home.blade.php
Deon George e106adc69e
All checks were successful
Create Docker Image / Build Docker Image (x86_64) (push) Successful in 39s
Create Docker Image / Final Docker Image Manifest (push) Successful in 10s
Optimisations for resellers home page
2024-07-05 17:23:27 +10:00

106 lines
3.6 KiB
PHP

@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ $o->role }} Home
@endsection
@section('page_title')
{{ $o->full_name }}
@endsection
@section('contentheader_title')
{{ $o->full_name }}
@endsection
@section('contentheader_description')
{{ $o->role }}
@endsection
@section('main-content')
<!-- Our Summary Home Page Boxes -->
<div class="row">
@include('theme.backend.adminlte.account.widget.summary_boxes')
</div>
<div class="card card-light card-tabs">
<div class="card-header p-0 pt-1">
<ul class="nav nav-tabs" id="accounts-tab" role="tablist">
<li class="pt-2 px-3"><h3 class="card-title">Accounts</h3></li>
@foreach($o->my_accounts as $ao)
<li class="nav-item">
<a class="nav-link @if(! $loop->index)active @endif" href="#account_{{ $ao->id }}" data-toggle="tab" aria-controls="account_{{ $ao->id }}" aria-selected="true">{{ $ao->name }}</a>
</li>
@endforeach
@canany('reseller','wholesaler')
@if ($o === $user)
<li class="nav-item ml-auto">
<a class="nav-link" href="#tab-reseller" data-toggle="tab">Reseller</a>
</li>
@endif
@endcanany
</ul>
</div>
<div class="card-body">
<div class="tab-content" id="accounts-tab-content">
@foreach($o->my_accounts as $ao)
<div class="tab-pane fade @if(! $loop->index)show active @endif" id="account_{{ $ao->id }}" role="tabpanel" aria-labelledby="account_{{ $ao->id }}">
<div class="row">
<div class="col-12">
<div class="card-header bg-white">
<ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link {{ (! session()->has('supplier_update')) ? 'active' : '' }}" href="#tab-services" data-toggle="tab">Services</a></li>
<li class="nav-item"><a class="nav-link" href="#tab-futureinvoice" data-toggle="tab">Future Invoice</a></li>
@canany('reseller','wholesaler')
<li class="nav-item ml-auto">
<a class="nav-link {{ session()->has('supplier_update') ? 'active' : '' }}" href="#tab-supplier" data-toggle="tab">Supplier</a>
</li>
@endcanany
</ul>
</div>
<div class="card-body pl-0 pr-0">
<div class="tab-content">
<div class="tab-pane {{ (! session()->has('supplier_update')) ? 'active' : '' }}" id="tab-services">
<div class="row">
<div class="col-12 col-xl-7">
@include('theme.backend.adminlte.account.widget.service_active',['o'=>$ao])
</div>
<div class="col-12 col-xl-5">
@include('theme.backend.adminlte.account.widget.invoice_due',['o'=>$ao])
@include('theme.backend.adminlte.account.widget.invoice_past',['o'=>$ao])
</div>
</div>
</div>
<div class="tab-pane" id="tab-futureinvoice">
<div class="row">
<div class="col-12 col-xl-9">
@include('theme.backend.adminlte.invoice.widget.next',['future'=>TRUE])
</div>
</div>
</div>
@canany('reseller','wholesaler')
<div class="tab-pane {{ session()->pull('supplier_update') ? 'active' : '' }}" id="tab-supplier" role="tabpanel">
@include('theme.backend.adminlte.user.widget.supplier')
</div>
@endcanany
</div>
</div>
</div>
</div>
</div>
@endforeach
@if ($o == $user)
@canany('reseller','wholesaler')
<div class="tab-pane" id="tab-reseller" role="tabpanel">
@include('theme.backend.adminlte.r.home.widget.home')
</div>
@endcanany
@endif
</div>
</div>
</div>
@endsection