Consolidate service resources into a top level services/ directory

This commit is contained in:
Deon George
2022-07-29 17:45:17 +10:00
parent 7f6df8d032
commit 97f5c84f23
36 changed files with 66 additions and 64 deletions

View File

@@ -3,7 +3,7 @@
@include('r.account.widgets.list')
</div>
<div class="col-8">
@include('r.service.widgets.movement')
@include('service.widget.movement')
@include('r.invoice.widgets.due')
</div>

View File

@@ -1,90 +0,0 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Domain Names
@endsection
@section('page_title')
Domains
@endsection
@section('contentheader_title')
Domain Names
@endsection
@section('contentheader_description')
Domain Names currently managed.
@endsection
@section('main-content')
<div class="row">
<div class="col-12">
<div class="card card-dark">
<div class="card-body">
<table class="table table-hover" id="services">
<thead>
<tr>
<th>Service ID</tH>
<th>Account</th>
<th>Product</th>
<th>Domain</th>
<th>Expires</th>
<th>Registrar</th>
<th>DNS Host</th>
<th>Next Billed</th>
<th>Price</th>
<th>Term</th>
</tr>
</thead>
<tbody>
@foreach ($o as $oo)
<tr @if ($oo->hasExpired()) class="table-danger" @endif>
<td><a href="{{ url('u/service',[$oo->service_id]) }}">{{ $oo->service->sid }}</td>
<td>{{ $oo->service->account->name }}</td>
<td>{{ $oo->service->product->name }}</td>
<td>{{ $oo->service->name }}</td>
<td>{{ $oo->service_expire ? $oo->service_expire->format('Y-m-d') : '-' }}</td>
<td>{{ $oo->registrar->name }}</td>
<td>{{ $oo->registrar_ns }}</td>
<td>@if ($oo->service->isBilled()) {{ $oo->service->invoice_next->format('Y-m-d') }}@else - @endif</td>
<td>@if (! $oo->service->external_billing)${{ number_format($oo->service->next_invoice_items(TRUE)->sum('total'),2) }}@else - @endif</td>
<td>{{ $oo->service->billing_interval_string }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@section('page-scripts')
@css(datatables,bootstrap4|rowgroup)
@js(datatables,bootstrap4|rowgroup)
<style>
.strike {
text-decoration: line-through;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('#services').DataTable({
order: [[5,'asc'],[1,'asc'],[2,'desc']],
rowGroup: {
dataSrc: 5,
},
columnDefs: [
{
targets: [5],
visible: false,
}
],
});
$('tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -1,94 +0,0 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Email Hosting
@endsection
@section('page_title')
Email Hosting
@endsection
@section('contentheader_title')
Email Hosting
@endsection
@section('contentheader_description')
Email Hosting currently managed.
@endsection
@section('main-content')
<div class="row">
<div class="col-12">
<div class="card card-dark">
<div class="card-body">
<table class="table table-hover" id="services">
<thead>
<tr>
<th>Service ID</tH>
<th>Account</th>
<th>Product</th>
<th>Domain</th>
<th>Expires</th>
<th>Supplier</th>
<th>Admin URL</th>
<th>Admin Details</th>
<th>Accounts</th>
<th>Next Billed</th>
<th>Price</th>
<th>Term</th>
</tr>
</thead>
<tbody>
@foreach ($o as $oo)
<tr @if ($oo->hasExpired()) class="table-danger" @endif>
<td><a href="{{ url('u/service',[$oo->service_id]) }}">{{ $oo->service->sid }}</td>
<td>{{ $oo->service->account->name }}</td>
<td>{{ $oo->service->product->name }}</td>
<td>{{ $oo->service->name }}</td>
<td>{{ $oo->service_expire ? $oo->service_expire->format('Y-m-d') : '-' }}</td>
<td>{{ $oo->service->product->supplier->name }}</td>
<td>{{ $oo->admin_url }}</td>
<td>@if($oo->admin_user){{ $oo->admin_user }}/{{ $oo->admin_pass }}@else &nbsp; @endif</td>
<td class="text-right">{{ number_format($oo->accounts ?: 0) }}</td>
<td>@if ($oo->service->isBilled()) {{ $oo->service->invoice_next->format('Y-m-d') }} @else - @endif</td>
<td>@if (! $oo->service->external_billing)${{ number_format($oo->service->next_invoice_items(TRUE)->sum('total'),2) }}@else - @endif</td>
<td>{{ $oo->service->billing_interval_string }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@section('page-scripts')
@css(datatables,bootstrap4|rowgroup)
@js(datatables,bootstrap4|rowgroup)
<style>
.strike {
text-decoration: line-through;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('#services').DataTable({
order: [[5,'asc'],[1,'asc'],[2,'desc']],
rowGroup: {
dataSrc: 5,
},
columnDefs: [
{
targets: [5],
visible: false,
}
],
});
$('tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -1,88 +0,0 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
Web Hosting
@endsection
@section('page_title')
Web Hosting
@endsection
@section('contentheader_title')
Web Hosting
@endsection
@section('contentheader_description')
Web Hosting currently managed.
@endsection
@section('main-content')
<div class="row">
<div class="col-12">
<div class="card card-dark">
<div class="card-body">
<table class="table table-hover" id="services">
<thead>
<tr>
<th>Service ID</tH>
<th>Account</th>
<th>Product</th>
<th>Domain</th>
<th>Expires</th>
<th>Supplier</th>
<th>Next Billed</th>
<th>Price</th>
<th>Term</th>
</tr>
</thead>
<tbody>
@foreach ($o as $oo)
<tr @if ($oo->hasExpired()) class="table-danger" @endif>
<td><a href="{{ url('u/service',[$oo->service_id]) }}">{{ $oo->service->sid }}</td>
<td>{{ $oo->service->account->name }}</td>
<td>{{ $oo->service->product->name }}</td>
<td>{{ $oo->service->name }}</td>
<td>{{ $oo->service_expire ? $oo->service_expire->format('Y-m-d') : '-' }}</td>
<td>{{ $oo->service->product->supplier->name }}</td>
<td>@if ($oo->service->isBilled()) {{ $oo->service->invoice_next->format('Y-m-d') }}@else - @endif</td>
<td>@if (! $oo->service->external_billing)${{ number_format($oo->service->next_invoice_items(TRUE)->sum('total'),2) }}@else - @endif</td>
<td>{{ $oo->service->billing_interval_string }}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
@endsection
@section('page-scripts')
@css(datatables,bootstrap4|rowgroup)
@js(datatables,bootstrap4|rowgroup)
<style>
.strike {
text-decoration: line-through;
}
</style>
<script type="text/javascript">
$(document).ready(function() {
$('#services').DataTable({
order: [[5,'asc'],[1,'asc'],[2,'desc']],
rowGroup: {
dataSrc: 5,
},
columnDefs: [
{
targets: [5],
visible: false,
}
],
});
$('tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append

View File

@@ -1,94 +0,0 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ $o->sid }}
@endsection
@section('page_title')
{{ $o->sid }}
@endsection
@section('contentheader_title')
Service: {{ $o->sid }} <strong>{{ $o->product->name }}</strong>
@endsection
@section('contentheader_description')
{{ $o->name }}
@endsection
@section('main-content')
<div class="row">
<div class="col-6">
<div class="card">
<div class="card-header">
<div class="card-title">Update Order Status: {{ $o->order_status }}</div>
</div>
<form class="form-horizontal" method="post" action="{{ url('r/service/update',$o->id) }}">
{{ csrf_field() }}
<div class="card-body">
<div class="form-group row">
<label for="reference" class="col-sm-3 col-form-label text-right">Pending Connection</label>
<div class="col-sm-6">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-calendar"></i></span>
</div>
<input type="text" class="form-control" id="datestart" name="start_at" value="{{ ($x=$o->start_at) ? $x->format('Y-m-d') : '' }}">
</div>
</div>
</div>
@includeIf('u.service.widgets.'.$o->product->category.'.order',['o'=>$o->type])
<div class="form-group row">
<label for="notes" class="col-sm-2 col-form-label text-right">Notes</label>
<div class="col-sm-10">
<textarea class="textarea" name="provision_notes">{{ $o->order_provision_notes ?? '' }}</textarea>
</div>
</div>
</div>
<div class="card-footer">
<button type="reset" class="btn btn-secondary mr-2" onclick="window.history.go(-1); return false;">Cancel</button>
<button type="submit" class="btn btn-success">Submit</button>
</div>
</form>
</div>
</div>
</div>
@endsection
@section('page-scripts')
@css(summernote)
@js(summernote)
<!-- @todo Put this into blade service provider -->
@themejs('//cdn.jsdelivr.net/momentjs/latest/moment.min.js','moment-js')
@themejs('//cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.min.js','daterange-js')
@themecss('//cdn.jsdelivr.net/npm/daterangepicker/daterangepicker.css','daterange-css')
<script>
$(document).ready(function() {
$('#datestart').daterangepicker({
singleDatePicker: true,
showDropdowns: true,
locale: {
format: 'YYYY-MM-DD'
}
});
$('.textarea').summernote({
minHeight: 350,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['view', ['codeview', 'help']],
],
});
});
</script>
@append

View File

@@ -1,81 +0,0 @@
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ $o->sid }}
@endsection
@section('page_title')
{{ $o->sid }}
@endsection
@section('contentheader_title')
Service: {{ $o->sid }} <strong>{{ $o->product->name }}</strong>
@endsection
@section('contentheader_description')
{{ $o->name }}
@endsection
@section('main-content')
<div class="row">
<div class="col-6">
<div class="card">
<div class="card-header">
<div class="card-title">Update Order Status: {{ $o->order_status }}</div>
</div>
<form class="form-horizontal" method="post" action="{{ url('r/service/update',$o->id) }}">
{{ csrf_field() }}
<div class="card-body">
<div class="form-group row">
<label for="reference" class="col-sm-3 col-form-label text-right">Order Ref</label>
<div class="col-sm-6">
<div class="input-group">
<div class="input-group-prepend">
<span class="input-group-text"><i class="fa fa-fw fa-hashtag"></i></span>
</div>
<input type="text" class="form-control" name="reference" value="{{ $o->order_info_reference ?? '' }}">
</div>
</div>
</div>
@includeIf('u.service.widgets.'.$o->product->category.'.order',['o'=>$o->type])
<div class="form-group row">
<label for="notes" class="col-sm-2 col-form-label text-right">Notes</label>
<div class="col-sm-10">
<textarea class="textarea" name="notes">{{ $o->order_info_notes ?? '' }}</textarea>
</div>
</div>
</div>
<div class="card-footer">
<button type="reset" class="btn btn-secondary mr-2" onclick="window.history.go(-1); return false;">Cancel</button>
<button type="submit" class="btn btn-success">Submit</button>
</div>
</form>
</div>
</div>
</div>
@endsection
@section('page-scripts')
@css(summernote)
@js(summernote)
<script>
$(document).ready(function() {
$('.textarea').summernote({
minHeight: 350,
toolbar: [
['style', ['style']],
['font', ['bold', 'underline', 'clear']],
['color', ['color']],
['para', ['ul', 'ol', 'paragraph']],
['table', ['table']],
['view', ['codeview', 'help']],
],
});
});
</script>
@append

View File

@@ -1,80 +0,0 @@
<!-- Show client movements -->
<div class="card card-dark">
<div class="card-header">
<h3 class="card-title">Service Movements</h3>
</div>
<div class="card-body">
@if (($x=$user->client_service_movements())->count())
<table class="table table-striped table-hover" id="service_movements">
<thead>
<tr>
<th>ID</th>
<th>Account</th>
<th>Name</th>
<th>Status</th>
<th>Product</th>
</tr>
</thead>
<tbody>
@foreach ($x as $o)
<tr>
<td><a href="{{ url('u/service',$o->id) }}">{{ $o->sid }}</a></td>
<td>{{ $o->account->name }}</td>
<td>{{ $o->name_short }}</td>
<td>
{{ $o->status }}
@switch($o->status)
@case ('ORDER-SENT')
<br>(#{{ $o->order_info_reference }})
@break;
@case ('PROVISION-PLANNED')
<br>({{ ($xx=$o->start_at) ? $xx->format('Y-m-d') : 'No Date' }})
@break;
@case ('CANCEL-PENDING')
<br>({{ ($xx=$o->stop_at) ? $xx->format('Y-m-d') : 'No Date' }})
@break;
@endswitch
</td>
<td>{{ $o->product->name }}</td>
</tr>
@endforeach
</tbody>
<tfoot>
<tr>
<th>Count {{ $x->count() }}</th>
<th colspan="4">&nbsp;</th>
</tr>
</tfoot>
</table>
@else
<p>No Service Movements</p>
@endif
</div>
</div>
@section('page-scripts')
@css(datatables,bootstrap4|rowgroup)
@js(datatables,bootstrap4|rowgroup)
<script type="text/javascript">
$(document).ready(function() {
$('#service_movements').DataTable( {
order: [3, 'asc'],
rowGroup: {
dataSrc: 1,
startRender: function ( rows, group ) {
return group+': '+rows.count()+' Services';
},
},
orderFixed: [1, 'asc']
});
$('#service_movements tbody').on('click','tr', function () {
$(this).toggleClass('selected');
});
});
</script>
@append