Start of service display

This commit is contained in:
Deon George
2019-06-29 10:14:12 +10:00
parent a426c7b1a4
commit 6103b61265
14 changed files with 426 additions and 33 deletions

View File

@@ -0,0 +1,46 @@
<table class="table table-bordered w-100" id="invoices">
<thead>
<tr>
<th class="text-right">#</th>
<th class="text-right">Issued</th>
<th class="text-right">Due</th>
<th class="text-right">Total</th>
<th class="text-right">Payments</th>
<th class="text-right">Outstanding</th>
</tr>
</thead>
<tbody>
@foreach ($o->invoices as $io)
<tr>
<td class="text-right"><a href="{{ url('u/invoice',$io->id) }}">{{ $io->id }}</a></td>
<td class="text-right">{{ $io->date_orig->format('Y-m-d') }}</td>
<td class="text-right">{{ $io->due_date->format('Y-m-d') }}</td>
<td class="text-right">${{ number_format($io->total,2) }}</td>
<td class="text-right">${{ number_format($io->paid,2) }}</td>
<td class="text-right">${{ number_format($io->due,2) }}</td>
</tr>
@endforeach
</tbody>
</table>
@section('page-scripts')
@css('https://cdn.datatables.net/1.10.19/css/jquery.dataTables.min.css','jq-dt-css','jquery');
@js('https://cdn.datatables.net/1.10.19/js/jquery.dataTables.min.js','jq-dt-js','jquery');
@css('https://cdn.datatables.net/responsive/2.2.1/css/responsive.dataTables.min.css','jq-dt-r-css','jq-dt-css')
@js('https://cdn.datatables.net/responsive/2.2.1/js/dataTables.responsive.min.js','jq-dt-r-js','jq-dt-js')
@css('/plugin/dataTables/dataTables.bootstrap4.css','dt-bootstrap4-css','jq-dt-css')
@js('/plugin/dataTables/dataTables.bootstrap4.js','dt-bootstrap4-js','jq-dt-js')
<script type="text/javascript">
$(document).ready(function() {
$('#invoices').DataTable( {
responsive: true,
order: [1, 'desc']
});
$('#invoices tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -0,0 +1,38 @@
<div class="card card-primary card-outline">
<div class="card-header">
<strong>Service Information</strong>
</div>
<div class="card-body">
<table class="table table-borderless">
<tr>
<th>Account</th>
<td>{{ $o->account->name }}</td>
</tr>
<tr>
<th>Active</th>
<td>{!! $o->status_html !!}</td>
</tr>
<tr>
<th>Billing Period</th>
<td>{{ $o->billing_period }}</td>
</tr>
<tr>
<th>Billing Amount</th>
<td>${{ number_format($o->billing_price,2) }}</td>
</tr>
<tr>
<th>Invoiced To</th>
<td>{{ $o->invoice_to ? $o->invoice_to->format('Y-m-d') : '' }}</td>
</tr>
<tr>
<th>Next Invoice</th>
<td>{{ $o->invoice_next ? $o->invoice_next->format('Y-m-d') : '' }}</td>
</tr>
<tr>
<th>Current Invoices Due</th>
<td>${{ number_format($o->invoices_due()->sum('due'),2) }} <small>({{ $o->invoices_due()->count() }})</small></td>
</tr>
</table>
</div>
</div>

View File

@@ -5,7 +5,7 @@
@endsection
@section('contentheader_title')
Service #
Service #{{ $o->id }}
@endsection
@section('contentheader_description')
{{ $o->service_id }}
@@ -14,11 +14,11 @@
@section('main-content')
<div class="col-md-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">Service Information</h3>
<div class="card-header with-border">
<h3 class="card-title">Service Information</h3>
</div>
<div class="box-body">
<div class="card-body">
<div class="col-md-3">
@switch($o->order_status)
@case('ORDER-SUBMIT')

View File

@@ -0,0 +1,129 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ $o->SID }}
@endsection
@section('contentheader_title')
Service: {{ $o->SID }}
@endsection
@section('page_title')
{{ $o->SID }}
@endsection
@section('contentheader_description')
{{ $o->type->name_full }}
@endsection
@section('main-content')
<div class="content">
<div class="row">
<div class="col-md-12">
<div class="card">
<div class="card-header p-2">
<ul class="nav nav-pills">
<li class="nav-item"><a class="nav-link active" href="#tab-service" data-toggle="tab">Service</a></li>
<li class="nav-item"><a class="nav-link" href="#tab-invoice" data-toggle="tab">Invoices</a></li>
<li class="nav-item"><a class="nav-link" href="#tab-email" data-toggle="tab">Emails</a></li>
<li class="nav-item"><a class="nav-link" href="#tab-traffic" data-toggle="tab">Traffic</a></li>
</ul>
</div>
<div class="card-body">
<div class="tab-content">
<div class="active tab-pane" id="tab-service">
<div class="row">
<div class="card-group w-100">
@include('common.service.widget.info')
<div class="card card-primary card-outline">
<div class="card-header">
<strong>Service Details</strong>
</div>
<div class="card-body">
<table class="table table-borderless">
<tr>
<th>Number</th>
<td>{{ $o->type->service_number }}</td>
</tr>
<tr>
<th>Address</th>
<td>{{ $o->type->service_address }}</td>
</tr>
<tr>
<th>Connected</th>
<td>{{ $o->type->service_connect_date->format('Y-m-d') }}</td>
</tr>
<tr>
<th>Contract</th>
<td>{{ $o->type->contract_term }} mths <small>(until {{ $o->type->service_contract_date ? $o->type->service_contract_date->addMonths($o->type->contract_term)->format('Y-m-d') : 'N/A' }})</small></td>
</tr>
<tr>
<th>Username</th>
<td>{{ $o->type->service_username }}</td>
</tr>
<tr>
<th>Password</th>
<td>{{ $o->type->service_password }}</td>
</tr>
<tr>
<th>IP Address</th>
<td>{{ $o->type->ipaddress ? $o->type->ipaddress : 'Dynamic' }}</td>
</tr>
</table>
</div>
</div>
<div class="card card-primary card-outline">
<div class="card-header">
<strong>DSL Details</strong>
</div>
<div class="card-body">
<table class="table table-borderless">
<tr>
<th>Speed</th>
<td>TBA</td>
</tr>
<tr>
<th>Peak Included Downloads</th>
<td>TBA</td>
</tr>
<tr>
<th>Traffic Last Month</th>
<td>TBA</td>
</tr>
<tr>
<th>Traffic This Month</th>
<td>TBA</td>
</tr>
<tr>
<th>Excess Traffic Charges to Bill</th>
<td>TBA</td>
</tr>
</table>
</div>
</div>
</div>
</div>
</div>
<div class="tab-pane" id="tab-invoice">
@include('common.invoice.widget.list')
</div>
<div class="tab-pane" id="tab-email">
</div>
<div class="tab-pane" id="tab-traffic">
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection

View File

@@ -15,7 +15,10 @@
<th>Account</th><td>{{ $o->account->company }}</td>
</tr>
<tr>
<th>Active</th><td>{{ $o->active }} ({{ $o->order_status }})</td>
<th>Active</th><td>{{ $o->active }} ({{ $o->order_status }}) [{{ $o->status }}]</td>
</tr>
<tr>
<th>Type</th><td>{{ $o->type->type }}</td>
</tr>
<tr>
<th>Product</th><td>{{ $o->product->name }}: {{ $o->name }}</td>