Work on Service rendering

This commit is contained in:
Deon George
2020-02-05 13:47:24 +09:00
parent 01a7d73c17
commit 5f5d114f42
12 changed files with 412 additions and 313 deletions

View File

@@ -0,0 +1,70 @@
<div class="card">
<!-- @todo -->
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
<div class="ribbon bg-warning">
Pending
</div>
</div>
@endif
<div class="card-header bg-gray-dark">
<h3 class="card-title">Broadband Details</h3>
</div>
<div class="card-body bg-gray-dark">
<table class="table table-sm">
<tr>
<th>Address</th>
<td class="text-uppercase">{{ $o->service_description }}</td>
</tr>
<tr>
<th>Service Number</th>
<td>{{ $o->service_name }}</td>
</tr>
<tr>
<th>Service Username</th>
<td>{{ $o->service_username }}</td>
</tr>
<tr>
<th>Service Password</th>
<td>{{ $o->service_password }}</td>
</tr>
@if($o->service_connect_date)
<tr>
<th>Connected</th>
<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
</tr>
@endif
<!-- @todo -->
@if(FALSE)
<tr>
<th>Speed</th>
<td>{{ 'xxx/YY' }} Mbps</td>
</tr>
<tr>
<th>Traffic</th>
<td>{{ 'xxx' }} GB (YY GB used month)</td>
</tr>
@endif
<tr>
<th>IP Address</th>
<td>{{ $o->ipaddress ?: 'Dynamic' }}</td>
</tr>
@if ($o->inContract())
<tr>
<th>Contract</th>
<td>{{ $o->contract_term }} months <small>({{ ($x=$o->service_contract_date->addMonths($o->contract_term))->diffForHumans() }})</small></td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
</tr>
@endif
<tr>
<th>Cancel Notice</th>
<td>1 month @if($o->inContract())<small>(after {{ $o->service_contract_date->addMonths($o->contract_term-1)->format('Y-m-d') }})</small>@endif</td>
</tr>
</table>
</div>
</div>

View File

@@ -0,0 +1,39 @@
<div class="card">
<div class="card-header bg-light">
<h3 class="card-title">Service Information</h3>
</div>
<div class="card-body bg-light">
<table class="table table-sm">
<tr>
<th>Status</th>
<td>{{ $o->status }}</td>
</tr>
@if ($o->active)
<tr>
<th>Billed</th>
<td>{{ $o->billing_period }}</td>
</tr>
<tr>
<th>Invoiced To</th>
<td>{{ $o->invoice_to->format('Y-m-d') }}</td>
</tr>
<tr>
<th>Paid Until</th>
<td>{{ $o->paid_to->format('Y-m-d') }}</td>
</tr>
<tr>
<th>Next Invoice</th>
<td>{{ $o->invoice_next->format('Y-m-d') }}</td>
</tr>
<tr>
<th>Estimated Invoice</th>
<td>${{ number_format($o->billing_price,2) }}</td>
</tr>
@endif
<tr>
<th>Payment Method</th>
<td>@if ($o->autopay)Direct Debit @else Invoice @endif</td>
</tr>
</table>
</div>
</div>