Work in progress, initial dashboard
This commit is contained in:
@@ -15,6 +15,15 @@
|
||||
<div class="content">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-red"><i class="fa fa-dollar"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Account Balance</span>
|
||||
<span class="info-box-number"><small>$</small>TBA {{ number_format($user->invoices_due->sum('due'),2) }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-green"><i class="fa fa-clone"></i></span>
|
||||
@@ -26,7 +35,7 @@
|
||||
</div>
|
||||
<div class="col-sm-3">
|
||||
<div class="info-box">
|
||||
<span class="info-box-icon bg-red"><i class="fa fa-dollar"></i></span>
|
||||
<span class="info-box-icon bg-blue"><i class="fa fa-dollar"></i></span>
|
||||
<div class="info-box-content">
|
||||
<span class="info-box-text">Invoices Due</span>
|
||||
<span class="info-box-number"><small>$</small>{{ number_format($user->invoices_due->sum('due'),2) }}</span>
|
||||
@@ -42,11 +51,9 @@
|
||||
<div class="col-xs-5">
|
||||
@include('widgets.invoices_due')
|
||||
</div>
|
||||
{{--
|
||||
<div class="col-xs-5">
|
||||
@include('widgets.payment_history',['limit'=>10])
|
||||
</div>
|
||||
--}}
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
15
resources/theme/backend/adminlte/r/supplier/create.blade.php
Normal file
15
resources/theme/backend/adminlte/r/supplier/create.blade.php
Normal file
@@ -0,0 +1,15 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Supplier Add
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<body>
|
||||
<form method="POST" action="/r/supplier/store">
|
||||
{{ csrf_field() }}
|
||||
Name: <input name="name" > <br>
|
||||
<button>Submit</button>
|
||||
</form>
|
||||
</body>
|
||||
@endsection
|
25
resources/theme/backend/adminlte/r/supplier/index.blade.php
Normal file
25
resources/theme/backend/adminlte/r/supplier/index.blade.php
Normal file
@@ -0,0 +1,25 @@
|
||||
@extends('layouts.auth')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Supplier List
|
||||
@endsection
|
||||
|
||||
@section('content')
|
||||
<body>
|
||||
|
||||
<table>
|
||||
<tr>
|
||||
<th>ID</th>
|
||||
<th>Name</th>
|
||||
</tr>
|
||||
@foreach (\App\Models\Supplier::all() as $o)
|
||||
<tr>
|
||||
<td>{{ $o->id }}</td>
|
||||
<td>{{ $o->name }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
</table>
|
||||
|
||||
Add new <a href="{{ url('r/supplier/create') }}">Supplier</a>.
|
||||
</body>
|
||||
@endsection
|
@@ -1,4 +1,4 @@
|
||||
<div class="box box-danger small">
|
||||
<div class="box box-info small">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Invoices Due</h3>
|
||||
<div class="box-tools pull-right">
|
||||
|
@@ -1,4 +1,4 @@
|
||||
<div class="box box-danger small">
|
||||
<div class="box box-notice small">
|
||||
<div class="box-header">
|
||||
<h3 class="box-title">Payment History</h3>
|
||||
<div class="box-tools pull-right">
|
||||
|
@@ -11,35 +11,62 @@
|
||||
|
||||
<div class="box-body">
|
||||
@if ($user->services_active->count())
|
||||
<table class="table table-bordered table-striped table-hover" id="table">
|
||||
<tr>
|
||||
<th>Type</th>
|
||||
<th>Service</th>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Next Invoice</th>
|
||||
</tr>
|
||||
@foreach ($user->services_active as $o)
|
||||
<tr>
|
||||
<td>{{ $o->category }}</td>
|
||||
<td>{{ $o->service_number }}</td>
|
||||
<td>{{ $o->service_name }}</td>
|
||||
<td><span class="label
|
||||
@switch($o->active)
|
||||
@case(1) label-success">Active @break
|
||||
@default label-warning">Unknown
|
||||
@endswitch
|
||||
</span></td>
|
||||
<td>{{ $o->next_invoice }}</td>
|
||||
</tr>
|
||||
@endforeach
|
||||
<tr>
|
||||
<th>Count {{ $user->services_active->count() }}</th>
|
||||
<th colspan="4"> </th>
|
||||
</tr>
|
||||
<table class="table table-bordered table-striped table-hover" id="services" style="width: 100%;">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Category</th>
|
||||
<th>Service</th>
|
||||
<th>Name</th>
|
||||
<th>Status</th>
|
||||
<th>Next Invoice</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<th>Count {{ $user->services_active->count() }}</th>
|
||||
<th colspan="4"> </th>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
@else
|
||||
<p>No services active</p>
|
||||
@endif
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section('page-scripts')
|
||||
@css('https://cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css')
|
||||
@css('https://cdn.datatables.net/rowgroup/1.0.2/css/rowGroup.dataTables.min.css')
|
||||
@js('https://cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js')
|
||||
@js('https://cdn.datatables.net/rowgroup/1.0.2/js/dataTables.rowGroup.min.js')
|
||||
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function() {
|
||||
var table = $('#services').DataTable( {
|
||||
rowGroup: {
|
||||
dataSrc: 'product_id',
|
||||
startRender: null,
|
||||
endRender: function ( rows, group ) {
|
||||
return group +' ('+rows.count()+')';
|
||||
},
|
||||
},
|
||||
orderFixed: [2, 'asc'],
|
||||
responsive: true,
|
||||
ajax: "/api/u/services",
|
||||
columns: [
|
||||
{
|
||||
defaultContent: ' '
|
||||
},
|
||||
{ data: "id" },
|
||||
{ data: "product_id" },
|
||||
{ data: "active" },
|
||||
{ data: "date_next_invoice" }
|
||||
],
|
||||
language: {
|
||||
emptyTable: "No Active Services"
|
||||
},
|
||||
order: [4, 'asc']
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@append
|
Reference in New Issue
Block a user