Change some widget title colors, added in Paypal payment routes

This commit is contained in:
Deon George 2021-06-30 15:50:33 +10:00
parent d02df6e98a
commit 835dcd6b98
No known key found for this signature in database
GPG Key ID: 7670E8DC27415254
7 changed files with 24 additions and 26 deletions

View File

@ -1,5 +1,5 @@
<!-- Show client movements --> <!-- Show client movements -->
<div class="card card-danger"> <div class="card card-dark">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Service Movements</h3> <h3 class="card-title">Service Movements</h3>
</div> </div>

View File

@ -16,17 +16,18 @@
@section('main-content') @section('main-content')
<div class="row"> <div class="row">
<div class="col-4"> <div class="col-4">
<div class="card"> <div class="card card-dark">
<div class="card-header"> <div class="card-header">
<span class="card-title">Invoices to Pay</span> <span class="card-title">Invoices to Pay</span>
</div> </div>
<div class="card-body"> <div class="card-body">
<form method="POST" action="{{ url('u/checkout/pay') }}"> <form method="POST" action="{{ url('u/checkout/pay') }}">
{{ csrf_field() }} @csrf
<input type="hidden" name="type" value="invoice"> <input type="hidden" name="type" value="invoice">
<div class="input-group flex-nowrap mb-5"> <div class="input-group mb-5">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text">Payment Method</span> <span class="input-group-text">Payment Method</span>
</div> </div>
@ -48,8 +49,8 @@
@foreach ($invoices as $io) @foreach ($invoices as $io)
<input type="hidden" name="invoice_id[]" value="{{ $io->id }}"> <input type="hidden" name="invoice_id[]" value="{{ $io->id }}">
<tr> <tr>
<td>{{ $io->id }}</td> <td>{{ $io->sid }}</td>
<td class="text-right">{{ $io->due }}</td> <td class="text-right">{{ number_format($io->due,2) }}</td>
</tr> </tr>
@endforeach @endforeach
@ -70,28 +71,22 @@
<th colspan="2"> <th colspan="2">
<input type="submit" class="btn btn-dark mt-2" name="pay" value="Cancel"> <input type="submit" class="btn btn-dark mt-2" name="pay" value="Cancel">
<input type="submit" class="btn btn-success mt-2 float-right" name="pay" value="Submit" disabled> <input type="submit" class="btn btn-success mt-2 float-right" name="pay" value="Submit" disabled>
<a href="{{ url('/home') }}" class="btn btn-danger mt-2 float-right mr-2">Add Invoice</a>
</th> </th>
</tr> </tr>
</tfoot> </tfoot>
</table> </table>
</form> </form>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
@endsection @endsection
@section('page-scripts') @section('page-scripts')
@css('//cdnjs.cloudflare.com/ajax/libs/select2/4.0.12/css/select2.min.css','select-css')
@js('//cdnjs.cloudflare.com/ajax/libs/select2/4.0.12/js/select2.min.js','select-js')
<script> <script>
$(document).ready(function() { $(document).ready(function() {
$('#paymethod').select2({ $('#paymethod').on('change',function(item) {
placeholder: 'Payment method...',
}).on('change',function(item) {
$.ajax({ $.ajax({
type: "POST", type: "POST",
data: {total: {{ $invoices->sum('due') }},count: {{ $invoices->count() }} }, data: {total: {{ $invoices->sum('due') }},count: {{ $invoices->count() }} },

View File

@ -1,5 +1,5 @@
<!-- Show past 12 months invoices --> <!-- Show past 12 months invoices -->
<div class="card card-success"> <div class="card card-dark">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Past Invoices</h3> <h3 class="card-title">Past Invoices</h3>
</div> </div>

View File

@ -1,5 +1,5 @@
<!-- Show past 12 months payments --> <!-- Show past 12 months payments -->
<div class="card card-success"> <div class="card card-dark">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Past Payments</h3> <h3 class="card-title">Past Payments</h3>
</div> </div>

View File

@ -1,5 +1,5 @@
<!-- Show active services --> <!-- Show active services -->
<div class="card card-primary"> <div class="card card-dark">
<div class="card-header"> <div class="card-header">
<h3 class="card-title">Active Services</h3> <h3 class="card-title">Active Services</h3>
</div> </div>

View File

@ -1,6 +1,6 @@
<?php <?php
use App\Http\Controllers\ResellerServicesController; use App\Http\Controllers\{CheckoutController,ResellerServicesController};
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -21,6 +21,6 @@ Route::group(['middleware'=>['auth:api','role:reseller']], function() {
}); });
Route::group(['middleware'=>'auth:api'], function() { Route::group(['middleware'=>'auth:api'], function() {
Route::post('/u/checkout/fee/{o}','CheckoutController@fee') Route::post('/u/checkout/fee/{o}',[CheckoutController::class,'fee'])
->where('o','[0-9]+'); ->where('o','[0-9]+');
}); });

View File

@ -1,6 +1,9 @@
<?php <?php
use App\Http\Controllers\{HomeController,WelcomeController}; use App\Http\Controllers\{CheckoutController,
HomeController,
PaypalController,
WelcomeController};
/* /*
|-------------------------------------------------------------------------- |--------------------------------------------------------------------------
@ -60,15 +63,15 @@ Route::group(['middleware'=>['theme:adminlte-be','auth'],'prefix'=>'u'],function
Route::get('account/{o}/invoice','User\AccountController@view_invoice_next') Route::get('account/{o}/invoice','User\AccountController@view_invoice_next')
->where('o','[0-9]+') ->where('o','[0-9]+')
->middleware('can:view,o'); ->middleware('can:view,o');
Route::post('checkout/pay','CheckoutController@pay'); Route::post('checkout/pay',[CheckoutController::class,'pay']);
Route::get('invoice/{o}',[HomeController::class,'invoice']) Route::get('invoice/{o}',[HomeController::class,'invoice'])
->where('o','[0-9]+') ->where('o','[0-9]+')
->middleware('can:view,o'); ->middleware('can:view,o');
Route::get('invoice/{o}/pdf',[HomeController::class,'invoice_pdf']) Route::get('invoice/{o}/pdf',[HomeController::class,'invoice_pdf'])
->where('o','[0-9]+') ->where('o','[0-9]+')
->middleware('can:view,o'); ->middleware('can:view,o');
Route::get('invoice/cart','CheckoutController@cart_invoice'); Route::get('invoice/cart',[CheckoutController::class,'cart_invoice']);
Route::get('invoice/cart/{o}','CheckoutController@cart_invoice') Route::get('invoice/cart/{o}',[CheckoutController::class,'cart_invoice'])
->where('o','[0-9]+') ->where('o','[0-9]+')
->middleware('can:view,o'); ->middleware('can:view,o');
Route::get('service/{o}',[HomeController::class,'service']) Route::get('service/{o}',[HomeController::class,'service'])
@ -102,8 +105,8 @@ Route::redirect('home','u/home');
Route::get('search','SearchController@search'); Route::get('search','SearchController@search');
Route::get('pay/paypal/authorise','PaypalController@authorise'); Route::get('pay/paypal/authorise',[PaypalController::class,'authorise']);
Route::get('pay/paypal/cancel','PaypalController@cancel'); Route::get('pay/paypal/cancel',[PaypalController::class,'cancel']);
Route::get('pay/paypal/capture','PaypalController@capture'); Route::get('pay/paypal/capture',[PaypalController::class,'capture']);
// To access any routes protected by demo-mode. // To access any routes protected by demo-mode.
Route::demoAccess('uc-access'); Route::demoAccess('uc-access');