Home screen improvements, testing for role, work on user/account models
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Client Home
|
||||
{{ $o->role }} Home
|
||||
@endsection
|
||||
@section('page_title')
|
||||
{{ $o->full_name }}
|
||||
@@ -11,10 +11,11 @@
|
||||
{{ $o->full_name }}
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
Client Home
|
||||
{{ $o->role }}
|
||||
@endsection
|
||||
|
||||
@section('main-content')
|
||||
<!-- Our Summary Home Page Boxes -->
|
||||
<div class="row">
|
||||
@include('common.account.widget.summary')
|
||||
</div>
|
||||
@@ -24,8 +25,17 @@
|
||||
<div class="card-header bg-white">
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item"><a class="nav-link active" href="#tab-services" data-toggle="tab">Services</a></li>
|
||||
{{--
|
||||
<!-- @todo this is not working -->
|
||||
<li class="nav-item"><a class="nav-link" href="#tab-nextinvoice" data-toggle="tab">Next Invoice</a></li>
|
||||
--}}
|
||||
<li class="nav-item"><a class="nav-link" href="#tab-futureinvoice" data-toggle="tab">Future Invoice</a></li>
|
||||
|
||||
@if ($o == $user)
|
||||
@canany('reseller','wholesaler')
|
||||
<li class="nav-item ml-auto"><a class="nav-link" href="#tab-reseller" data-toggle="tab">Reseller</a></li>
|
||||
@endcanany
|
||||
@endif
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
@@ -33,11 +43,11 @@
|
||||
<div class="tab-content">
|
||||
<div class="active tab-pane" id="tab-services">
|
||||
<div class="row">
|
||||
<div class="col-7">
|
||||
<div class="col-12 col-xl-7">
|
||||
@include('u.service.widgets.active')
|
||||
</div>
|
||||
|
||||
<div class="col-5">
|
||||
<div class="col-12 col-xl-5">
|
||||
@include('u.invoice.widgets.due')
|
||||
|
||||
@include('u.invoice.widgets.list')
|
||||
@@ -47,6 +57,8 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{--
|
||||
<!-- @todo this is not working -->
|
||||
<div class="tab-pane" id="tab-nextinvoice">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
@@ -54,16 +66,39 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
--}}
|
||||
|
||||
<div class="tab-pane" id="tab-futureinvoice">
|
||||
<div class="row">
|
||||
<div class="col-12">
|
||||
<div class="col-12 col-xl-9">
|
||||
@include('u.invoice.widgets.next',['future'=>TRUE])
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if ($o == $user)
|
||||
@canany('reseller','wholesaler')
|
||||
<div class="tab-pane" id="tab-reseller">
|
||||
@include('r.home.widgets.home')
|
||||
</div>
|
||||
@endcanany
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@endsection
|
||||
|
||||
@section('page-scripts')
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
$('body')
|
||||
.addClass('sidebar-collapse')
|
||||
.delay(500)
|
||||
.queue(function () {
|
||||
window.dispatchEvent(new Event('resize'));
|
||||
$(this).dequeue();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
@@ -10,11 +10,11 @@
|
||||
<th class="text-right">${{ number_format($oo->sum('total'),2) }}</th>
|
||||
</tr>
|
||||
|
||||
@foreach ($oo->groupBy('service_id') as $ooo)
|
||||
<tr>
|
||||
<td class="pt-0 pb-1" style="width: 8em;"><a href="{{ url('u/service',$ooo->first()->service_id) }}">{{ $ooo->first()->service->sid }}</a></td>
|
||||
<td class="pt-0 pb-1" colspan="3">{{ $ooo->first()->service->sname }}: {{ $ooo->first()->service->sdesc }}</td>
|
||||
</tr>
|
||||
@foreach ($oo->groupBy('service_id') as $ooo)
|
||||
<tr>
|
||||
<td class="pt-0 pb-1" style="width: 12em;"><a href="{{ url('u/service',$ooo->first()->service_id) }}">{{ $ooo->first()->service->sid }}</a></td>
|
||||
<td class="pt-0 pb-1" colspan="3">{{ $ooo->first()->service->sname }}: {{ $ooo->first()->service->sdesc }}</td>
|
||||
</tr>
|
||||
|
||||
@foreach ($ooo as $io)
|
||||
<tr>
|
||||
|
@@ -59,7 +59,7 @@
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
$('#services_active').DataTable( {
|
||||
$('#services_active').DataTable({
|
||||
order: [[1,'asc'],[2,'asc']],
|
||||
rowGroup: {
|
||||
dataSrc: 1,
|
||||
|
Reference in New Issue
Block a user