Some order processing
This commit is contained in:
38
resources/theme/backend/adminlte/a/service.blade.php
Normal file
38
resources/theme/backend/adminlte/a/service.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@extends('adminlte::layouts.app')
|
||||
|
||||
@section('htmlheader_title')
|
||||
Service #{{ $o->id }}
|
||||
@endsection
|
||||
|
||||
@section('contentheader_title')
|
||||
Service #
|
||||
@endsection
|
||||
@section('contentheader_description')
|
||||
{{ $o->service_id }}
|
||||
@endsection
|
||||
|
||||
@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>
|
||||
|
||||
<div class="box-body">
|
||||
<div class="col-md-3">
|
||||
@include('u.widgets.service_info')
|
||||
</div>
|
||||
|
||||
@if($o->order_status == 'ORDER-REQUEST')
|
||||
<div class="col-md-3">
|
||||
@include('a.widgets.service_order-request')
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<button type="submit" class="btn btn-info">Save</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
@@ -0,0 +1,49 @@
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Service Order Information</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<form role="form" method="POST" enctype="multipart/form-data">
|
||||
{{ csrf_field() }}
|
||||
|
||||
<div class="box-body">
|
||||
<table class="table table-condensed" width="100%">
|
||||
<tr>
|
||||
<th>Order Info</th>
|
||||
<td>{{ $o->order_info ? join('|',$o->order_info) : '*NONE*' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Order Notes</th>
|
||||
<td>{{ $o->order_notes ?: '*NONE*' }}</td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<div class="row">
|
||||
<div class="control-group form-group col-sm-12 {{ $errors->has('order_notes') ? 'has-error' : '' }}">
|
||||
<span class="help-block">{{ $errors->first('product_options') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group form-group col-sm-12 {{ $errors->has('order_notes') ? 'has-error' : '' }}">
|
||||
<label for="order_notes">Notes To Supplier/Client</label>
|
||||
<textarea name="order_notes" class="form-control" rows="4" placeholder="APPROVE goes to Supplier, REJECT goes to Client.">{{ old('order_notes') }}</textarea>
|
||||
<span class="help-block">{{ $errors->first('order_notes') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
<div class="box-footer">
|
||||
<input class="btn btn-success" type="submit" name="action" value="Approve">
|
||||
<input class="btn btn-danger" type="submit" name="action" value="Reject">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
@@ -53,24 +53,30 @@
|
||||
url: "/api/r/service_movements"
|
||||
},
|
||||
columns: [
|
||||
{ data: "service_id_url" },
|
||||
{ data: "account_name" },
|
||||
{ data:
|
||||
@if($user->isWholesaler())
|
||||
"admin_service_id_url"
|
||||
@else
|
||||
"service_id_url"
|
||||
@endif
|
||||
},
|
||||
{ data: "account_name" },
|
||||
{ data: "name" },
|
||||
{ data: "status" },
|
||||
{ data: "status" },
|
||||
{ data: "product_name" }
|
||||
],
|
||||
language: {
|
||||
emptyTable: "No Active Clients"
|
||||
},
|
||||
order: [1, 'asc'],
|
||||
rowGroup: {
|
||||
dataSrc: 'product_name',
|
||||
startRender: null,
|
||||
endRender: function ( rows, group ) {
|
||||
return rows.count()+' x ' + group;
|
||||
},
|
||||
},
|
||||
orderFixed: [4, 'asc']
|
||||
rowGroup: {
|
||||
dataSrc: 'account_name',
|
||||
startRender: null,
|
||||
endRender: function ( rows, group ) {
|
||||
return rows.count()+' x ' + group;
|
||||
},
|
||||
},
|
||||
orderFixed: [4, 'asc']
|
||||
});
|
||||
|
||||
$('#service_movements tbody').on('click','tr', function () {
|
||||
|
@@ -0,0 +1,46 @@
|
||||
<div class="box">
|
||||
<div class="box-header with-border">
|
||||
<h3 class="box-title">Service Information</h3>
|
||||
<div class="box-tools pull-right">
|
||||
<button type="button" class="btn btn-box-tool" data-widget="collapse" data-toggle="tooltip" title="Collapse">
|
||||
<i class="fa fa-minus"></i></button>
|
||||
<button type="button" class="btn btn-box-tool" data-widget="remove" data-toggle="tooltip" title="Remove">
|
||||
<i class="fa fa-times"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box-body">
|
||||
<table class="table table-condensed" width="100%">
|
||||
<tr>
|
||||
<th>Account</th><td>{{ $o->account->company }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Active</th><td>{{ $o->active }} ({{ $o->order_status }})</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Billing Period</th><td>{{ $o->recur_schedule }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Billing Amount</th><td>{{ $o->cost }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Product</th><td>{{ $o->product->name }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Last Invoice</th><td>{{ $o->date_last_invoice }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Paid Until</th><td>{{ 'TBA' }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>Next Invoice</th><td>{{ $o->date_next_invoice }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
|
||||
{{--
|
||||
<div class="box-footer">
|
||||
</div>
|
||||
--}}
|
||||
</div>
|
@@ -219,6 +219,35 @@
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2"><button class="btn btn-block btn-primary">Previous</button></div>
|
||||
<div class="col-sm-2"><button class="btn btn-block btn-primary next">Next</button></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<!-- Additional Notes -->
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">Notes</h4>
|
||||
</div>
|
||||
|
||||
<div class="panel-collapse margin-bottom-20">
|
||||
<div class="panel-body">
|
||||
<div class="col-md-12">
|
||||
<div class="control-group form-group col-sm-12 {{ $errors->has('order_notes') ? 'has-error' : '' }}">
|
||||
<span class="help-block">{{ $errors->first('product_options') }}</span>
|
||||
</div>
|
||||
|
||||
<div class="control-group form-group col-sm-12 {{ $errors->has('order_notes') ? 'has-error' : '' }}">
|
||||
<label for="order_notes">Notes</label>
|
||||
<textarea name="order_notes" class="form-control" rows="4" placeholder="Enter any special instructions...">{{ old('order_notes') }}</textarea>
|
||||
<span class="help-block">{{ $errors->first('order_notes') }}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-2"><button class="btn btn-block btn-primary">Previous</button></div>
|
||||
<div class="col-sm-2 pull-right"><input type="submit" class="btn btn-block btn-primary" value="Submit Order"></div>
|
||||
|
30
resources/views/email/admin/order/approve.blade.php
Normal file
30
resources/views/email/admin/order/approve.blade.php
Normal file
@@ -0,0 +1,30 @@
|
||||
@component('mail::message',['site'=>$site])
|
||||
# Please order the following service.
|
||||
|
||||
@component('mail::panel')
|
||||
|
||||
@component('mail::table')
|
||||
| Service | Details |
|
||||
| :---------- | :---------------- |
|
||||
| Account | {{ $service->account_name }} ({!! $service->account->account_id_url !!}) |
|
||||
| Service ID | {!! $service->service_id_url !!} |
|
||||
| Product | {{ $service->product_name }} |
|
||||
@switch($service->category)
|
||||
@case('ADSL')
|
||||
| Address | {{ $service->service_adsl->service_address }} |
|
||||
@break;
|
||||
@case('VOIP')
|
||||
| Address | {{ $service->service_voip->service_address }} |
|
||||
| Supplier Details | {{ join(':',$service->order_info) }} |
|
||||
@break;
|
||||
@endswitch
|
||||
|
||||
@endcomponent
|
||||
|
||||
**NOTES:** {{ $notes }}
|
||||
|
||||
@endcomponent
|
||||
|
||||
Thanks,<br>
|
||||
{{ config('app.name') }}
|
||||
@endcomponent
|
@@ -4,4 +4,4 @@
|
||||
<img class="pull-left" src="{{ $logo }}"> <div class="pull-right">{{ $slot }}</div>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
@@ -1,8 +1,8 @@
|
||||
@component('mail::layout')
|
||||
{{-- Header --}}
|
||||
@slot('header')
|
||||
@component('mail::header', ['url' => config('app.url'),'logo'=>url($logo)])
|
||||
{{ $site_name }}
|
||||
@component('mail::header', ['url' => config('app.url'),'logo'=>url($site->site_logo)])
|
||||
{{ $site->site_name }}
|
||||
@endcomponent
|
||||
@endslot
|
||||
|
||||
@@ -24,4 +24,4 @@
|
||||
© {{ date('Y') }} {{ config('app.name') }}. All rights reserved.
|
||||
@endcomponent
|
||||
@endslot
|
||||
@endcomponent
|
||||
@endcomponent
|
Reference in New Issue
Block a user