Move billing more service::class methods into __get(), use of component ribbons for service status
This commit is contained in:
7
resources/views/components/ribbons/change.blade.php
Normal file
7
resources/views/components/ribbons/change.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
@if($change)
|
||||
<div class="ribbon-wrapper ribbon-lg">
|
||||
<div class="ribbon bg-warning">
|
||||
Change
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
7
resources/views/components/ribbons/pending.blade.php
Normal file
7
resources/views/components/ribbons/pending.blade.php
Normal file
@@ -0,0 +1,7 @@
|
||||
@if($pending)
|
||||
<div class="ribbon-wrapper ribbon-lg">
|
||||
<div class="ribbon bg-warning">
|
||||
Pending
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
@@ -32,7 +32,7 @@
|
||||
<div class="col-8 col-sm-5 col-md-12 col-lg-6">
|
||||
<x-leenooks::form.date name="change_date" icon="fa-calendar" label="Request Change Date" :value="Carbon::now()->addDays(7)->format('Y-m-d')"/>
|
||||
</div>
|
||||
@if($so->isContract())
|
||||
@if($so->is_contracted)
|
||||
<div class="col-12 col-sm-7 col-md-12 col-lg-6">
|
||||
<strong>NOTE</strong>: This service is in a contract until <strong>{{ $so->contract_end->format('Y-m-d') }}</strong>, thus it may not be able to change plans.
|
||||
</div>
|
||||
|
@@ -40,7 +40,7 @@
|
||||
<li class="nav-item ml-auto"><a class="nav-link" href="#billing" data-toggle="tab">Billing History</a></li>
|
||||
<li class="nav-item"><a class="nav-link" href="#internal" data-toggle="tab">Internal</a></li>
|
||||
<li class="nav-item"><a @class(['nav-link','active'=>session()->has('service_update')]) href="#update" data-toggle="tab">Update</a></li>
|
||||
@if($o->active || $o->isPending())
|
||||
@if($o->active || $o->is_pending_active)
|
||||
<li class="nav-item"><a @class(['nav-link','active'=>session()->has('charge_add')]) href="#charge" data-toggle="tab">Charge</a></li>
|
||||
@endif
|
||||
@endcan
|
||||
@@ -95,7 +95,7 @@
|
||||
@include('theme.backend.adminlte.service.widget.update')
|
||||
</div>
|
||||
|
||||
@if($o->active || $o->isPending())
|
||||
@if($o->active || $o->is_pending_active)
|
||||
<div @class(['tab-pane','fade','show active'=>session()->pull('charge_add')]) id="charge">
|
||||
@include('theme.backend.adminlte.service.widget.charge')
|
||||
</div>
|
||||
|
@@ -1,13 +1,8 @@
|
||||
<!-- $o=Service\Broadband::class -->
|
||||
|
||||
<div class="card">
|
||||
@if($o->service->isPending())
|
||||
<div class="ribbon-wrapper ribbon-lg">
|
||||
<div class="ribbon bg-warning">
|
||||
Pending
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<x-ribbons.change :change="$o->service->is_pending_change"/>
|
||||
<x-ribbons.pending :pending="$o->service->is_pending_active"/>
|
||||
|
||||
<div class="card-header bg-gray-dark">
|
||||
<h3 class="card-title">Broadband Details</h3>
|
||||
|
@@ -1,13 +1,8 @@
|
||||
<!-- $o=Service\Domain::class -->
|
||||
|
||||
<div class="card">
|
||||
@if($o->service->isPending())
|
||||
<div class="ribbon-wrapper ribbon-lg">
|
||||
<div class="ribbon bg-warning">
|
||||
Pending
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<x-ribbons.change :change="$o->service->is_pending_change"/>
|
||||
<x-ribbons.pending :pending="$o->service->is_pending_active"/>
|
||||
|
||||
<div class="card-header bg-gray-dark">
|
||||
<h3 class="card-title">Domain Details</h3>
|
||||
|
@@ -1,13 +1,8 @@
|
||||
<!-- $o=Service\Email::class -->
|
||||
|
||||
<div class="card">
|
||||
@if($o->service->isPending())
|
||||
<div class="ribbon-wrapper ribbon-lg">
|
||||
<div class="ribbon bg-warning">
|
||||
Pending
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<x-ribbons.change :change="$o->service->is_pending_change"/>
|
||||
<x-ribbons.pending :pending="$o->service->is_pending_active"/>
|
||||
|
||||
<div class="card-header bg-gray-dark">
|
||||
<h3 class="card-title">Email Hosting Details</h3>
|
||||
|
@@ -1,13 +1,8 @@
|
||||
<!-- $o=Service\Host::class -->
|
||||
|
||||
<div class="card">
|
||||
@if($o->service->isPending())
|
||||
<div class="ribbon-wrapper ribbon-lg">
|
||||
<div class="ribbon bg-warning">
|
||||
Pending
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<x-ribbons.change :change="$o->service->is_pending_change"/>
|
||||
<x-ribbons.pending :pending="$o->service->is_pending_active"/>
|
||||
|
||||
<div class="card-header bg-gray-dark">
|
||||
<h3 class="card-title">Hosting Details</h3>
|
||||
|
@@ -22,7 +22,7 @@
|
||||
<th>Status</th>
|
||||
<td><x-button.status :status="$o->status" :substatus="$o->order_status"/></td>
|
||||
</tr>
|
||||
@if($o->isPendingCancel())
|
||||
@if($o->is_pending_cancel)
|
||||
<tr>
|
||||
<th>Cancel Date</th>
|
||||
<td>{{ $o->stop_at->format('Y-m-d') }}</td>
|
||||
@@ -34,13 +34,13 @@
|
||||
<td>{{ $o->order_info_reference ?? '' }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if($o->start_at && $o->isPending())
|
||||
@if($o->start_at && $o->is_pending_active)
|
||||
<tr>
|
||||
<th>Pending Connection</th>
|
||||
<td>{{ $o->start_at->format('Y-m-d') }}</td>
|
||||
</tr>
|
||||
@endif
|
||||
@if(($o->active || $o->isPending()) && (! $o->external_billing))
|
||||
@if(($o->active || $o->is_pending_active) && (! $o->external_billing))
|
||||
<tr>
|
||||
<th>Billed</th>
|
||||
<td>{{ $o->billing_interval_name }}</td>
|
||||
@@ -53,7 +53,7 @@
|
||||
<td>${{ number_format($o->billing_charge_taxed,2) }}</td>
|
||||
@endif
|
||||
</tr>
|
||||
@if($o->isActive() && $o->invoiced_to)
|
||||
@if($o->is_active && $o->invoiced_to)
|
||||
<tr>
|
||||
<th>Invoiced To</th>
|
||||
<td>{{ $o->invoiced_to->format('Y-m-d') }}</td>
|
||||
@@ -83,7 +83,7 @@
|
||||
<td>@if($o->billing)Direct Debit @else Invoice @endif</td>
|
||||
</tr>
|
||||
|
||||
@elseif($o->wasCancelled())
|
||||
@elseif($o->is_cancelled)
|
||||
<tr>
|
||||
<th>Cancelled</th>
|
||||
<td>{{ ($o->stop_at ?: $o->paid_to)?->format('Y-m-d') }}</td>
|
||||
@@ -92,7 +92,7 @@
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@if($o->active || $o->isPending())
|
||||
@if($o->active || $o->is_pending_active)
|
||||
<div class="card-footer sm">
|
||||
<strong><sup>*</sup>NOTE:</strong> Estimated Invoice does not include any setup, connection nor all current billing cycle usage charges.
|
||||
</div>
|
||||
|
@@ -131,7 +131,7 @@
|
||||
|
||||
<tr>
|
||||
<th>Contract Left</th>
|
||||
@if($o->isContract())
|
||||
@if($o->is_contracted)
|
||||
<td>${{ number_format($o->billing_charge_to($o->contract_end),2) }} (<small>{{ $o->paid_to?->format('Y-m-d') }}</small>)</td>
|
||||
<td>${{ number_format($o->billing_cost_to($o->contract_end),2) }} (<small>{{ $o->invoiced_to?->format('Y-m-d') }}</small>)</td>
|
||||
<td>{{ $o->contract_end->format('Y-m-d') }}<br><small>({{ $o->contract_end->diffForHumans(now(),CarbonInterface::DIFF_RELATIVE_TO_OTHER,FALSE,2) }} today)</small></td>
|
||||
|
@@ -1,13 +1,8 @@
|
||||
<!-- $o=Service\Phone::class -->
|
||||
|
||||
<div class="card">
|
||||
@if($o->service->isPending())
|
||||
<div class="ribbon-wrapper ribbon-lg">
|
||||
<div class="ribbon bg-warning">
|
||||
Pending
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<x-ribbons.change :change="$o->service->is_pending_change"/>
|
||||
<x-ribbons.pending :pending="$o->service->is_pending_active"/>
|
||||
|
||||
<div class="card-header bg-gray-dark">
|
||||
<h3 class="card-title">Phone Details</h3>
|
||||
|
@@ -1,11 +1,6 @@
|
||||
<div class="card">
|
||||
@if($o->service->isPending())
|
||||
<div class="ribbon-wrapper ribbon-lg">
|
||||
<div class="ribbon bg-warning">
|
||||
Pending
|
||||
</div>
|
||||
</div>
|
||||
@endif
|
||||
<x-ribbons.change :change="$o->service->is_pending_change"/>
|
||||
<x-ribbons.pending :pending="$o->service->is_pending_active"/>
|
||||
|
||||
<div class="card-header bg-gray-dark">
|
||||
<h3 class="card-title">SSL Details</h3>
|
||||
|
Reference in New Issue
Block a user