Start work on updating services

This commit is contained in:
Deon George
2022-04-19 17:07:39 +10:00
parent ebf08ea414
commit 621a132e35
63 changed files with 1038 additions and 612 deletions

View File

@@ -60,7 +60,7 @@
<script type="text/javascript">
$(document).ready(function() {
$('#services_active').DataTable( {
order: [4,'asc'],
order: [[1,'asc'],[2,'asc']],
rowGroup: {
dataSrc: 1,
endRender: function ( rows, group ) {

View File

@@ -1,4 +1,4 @@
<!-- $o = Service\Broadband::class -->
<!-- $o = App\Models\Service\Broadband::class -->
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
@@ -30,18 +30,17 @@
<th>Service Password</th>
<td>{{ $o->service_password }}</td>
</tr>
@if($o->service_connect_date)
@if($o->connect_at)
<tr>
<th>Connected</th>
<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
<td>{{ $o->connect_at->format('Y-m-d') }}</td>
</tr>
@endif
<!-- @todo -->
@if($o->technology)
<tr>
<th>Technology</th>
<td>{{ $o->technology }}</td>
</tr>
@if($x=$o->technology)
<tr>
<th>Technology</th>
<td>{{ $x }}</td>
</tr>
@endif
<tr>
<th>Speed</th>
@@ -50,26 +49,30 @@
<!-- @todo -->
<tr>
<th>Traffic</th>
<td>{{ $o->service->product->type->allowance_string() }} GB @if(FALSE)(YY GB used month)@endif</td>
<td>{{ $o->service->offering->allowance_string() }} GB @if(FALSE)(YY GB used month)@endif</td>
</tr>
<tr>
<th>IP Address</th>
<th>IP4 Address</th>
<td>{{ $o->ipaddress ?: 'Dynamic' }}</td>
</tr>
<tr>
<th>IP6 Address</th>
<td>{{ $o->ip6address ?: '-' }}</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>
<td>{{ $o->contract_term }} months</td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
<td>{{ $o->service_expire->format('Y-m-d') }} <small>({{ $o->service_expire->diffForHumans() }})</small></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>
<td>1 month @if($o->inContract())<small>(after {{ $o->service_expire->subMonth()->format('Y-m-d') }})</small>@endif</td>
</tr>
</table>
</div>
</div>
</div>

View File

@@ -1,3 +1,4 @@
<!-- $o = App\Models\Service\Domain::class -->
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
@@ -39,20 +40,10 @@
<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
</tr>
@endif
@if ($o->inContract())
<tr>
<th>Contract</th>
<!-- @todo -->
<td>12 months <small>({{ ($x=$o->domain_expire)->diffForHumans() }})</small></td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
</tr>
@endif
<tr>
<th>Cancel Notice</th>
<td>Before renewal</td>
<th>Expires</th>
<td>{{ $o->expire_at->format('Y-m-d') }} <small>({{ $o->expire_at->diffInMonths() }} months) </small></td>
</tr>
</table>
</div>

View File

@@ -1,5 +1,4 @@
<!-- $o = App\Models\Service\Host::class -->
{{-- @todo Change this to App\Models\Service\Email --}}
<!-- $o = App\Models\Service\Email::class -->
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
@@ -27,13 +26,12 @@
@endif
@if ($o->inContract())
<tr>
<th>Contract</th>
<!-- @todo -->
<td>12 months <small>({{ ($x=$o->domain_expire)->diffForHumans() }})</small></td>
<th>Contract Term</th>
<td>{{ $o->service->contract_term }} months</td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
<td>{{ $o->service->contract_end->format('Y-m-d') }} <small>({{ $o->service->contract_end->diffForHumans() }})</small></td>
</tr>
@endif
<tr>

View File

@@ -1,3 +1,4 @@
<!-- $o = App\Models\Service\Host::class -->
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
@@ -39,13 +40,12 @@
@endif
@if ($o->inContract())
<tr>
<th>Contract</th>
<!-- @todo -->
<td>12 months <small>({{ ($x=$o->domain_expire)->diffForHumans() }})</small></td>
<th>Contract Term</th>
<td>{{ $o->service->contract_term }} months</td>
</tr>
<tr>
<th>Contract End</th>
<td>{{ $x->format('Y-m-d') }}</td>
<td>{{ $o->service->contract_end->format('Y-m-d') }} <small>({{ $o->service->contract_end->diffForHumans() }})</small></td>
</tr>
@endif
<tr>

View File

@@ -1,3 +1,4 @@
<!-- $o = App\Models\Service -->
<div class="card">
@if($o->external_billing)
<div class="ribbon-wrapper ribbon-lg">
@@ -15,7 +16,7 @@
<table class="table table-sm">
<tr>
<th>Account</th>
<td><a href="{{url('u/home/',$o->account_id)}}">{{ $o->account->aid }}</a></td>
<td><a href="{{url('u/home/',$o->account->user_id)}}">{{ $o->account->aid }}</a></td>
</tr>
<tr>
<th>Status</th>

View File

@@ -1,3 +1,4 @@
<!-- $o = App\Models\Service\Phone::class -->
<div class="card">
@if($o->service->isPending())
<div class="ribbon-wrapper ribbon-lg">
@@ -8,7 +9,7 @@
@endif
<div class="card-header bg-gray-dark">
<h3 class="card-title">VOIP Details</h3>
<h3 class="card-title">Phone Details</h3>
</div>
<div class="card-body bg-gray-dark">
@@ -29,10 +30,10 @@
<th>Service Password</th>
<td>{{ $o->service_password }}</td>
</tr>
@if($o->service_connect_date)
@if($o->connect_at)
<tr>
<th>Connected</th>
<td>{{ $o->service_connect_date->format('Y-m-d') }}</td>
<td>{{ $o->connect_at->format('Y-m-d') }}</td>
</tr>
@endif
<!-- @todo -->