Compare commits
1 Commits
2512182910
...
cb9be6534f
Author | SHA1 | Date | |
---|---|---|---|
cb9be6534f |
@ -12,14 +12,13 @@ use Illuminate\Support\Facades\Log;
|
|||||||
use Illuminate\Support\Facades\Mail;
|
use Illuminate\Support\Facades\Mail;
|
||||||
use Illuminate\Support\Facades\Session;
|
use Illuminate\Support\Facades\Session;
|
||||||
use Illuminate\Support\Facades\Validator;
|
use Illuminate\Support\Facades\Validator;
|
||||||
use Illuminate\Validation\Rule;
|
|
||||||
use Illuminate\Validation\ValidationException;
|
use Illuminate\Validation\ValidationException;
|
||||||
use Illuminate\View\View;
|
use Illuminate\View\View;
|
||||||
use Symfony\Component\HttpKernel\Exception\HttpException;
|
use Symfony\Component\HttpKernel\Exception\HttpException;
|
||||||
|
|
||||||
use App\Http\Requests\ServiceChangeRequest;
|
use App\Http\Requests\ServiceChangeRequest;
|
||||||
use App\Mail\{CancelRequest,ChangeRequest};
|
use App\Mail\{CancelRequest,ChangeRequest};
|
||||||
use App\Models\{Charge,Invoice,Product,Service};
|
use App\Models\{Charge,Product,Service};
|
||||||
|
|
||||||
class ServiceController extends Controller
|
class ServiceController extends Controller
|
||||||
{
|
{
|
||||||
@ -416,74 +415,39 @@ class ServiceController extends Controller
|
|||||||
*/
|
*/
|
||||||
public function update(Request $request,Service $o)
|
public function update(Request $request,Service $o)
|
||||||
{
|
{
|
||||||
Session::put('service_update',true);
|
if ($o->type->validation()) {
|
||||||
|
Session::put('service_update',true);
|
||||||
|
$validator = Validator::make($x=$request->post($o->category),$o->type->validation());
|
||||||
|
|
||||||
// We dynamically create our validation
|
if ($validator->fails()) {
|
||||||
$validator = Validator::make(
|
return redirect()
|
||||||
$request->post(),
|
->back()
|
||||||
$x=collect($o->type->validation())
|
->withErrors($validator)
|
||||||
->keys()
|
->withInput();
|
||||||
->transform(fn($item)=>sprintf('%s.%s',$o->category,$item))
|
}
|
||||||
->combine(array_values($o->type->validation()))
|
|
||||||
->transform(fn($item)=>is_string($item)
|
|
||||||
? preg_replace('/^exclude_without:/',sprintf('exclude_without:%s.',$o->category),$item)
|
|
||||||
: $item)
|
|
||||||
->merge(
|
|
||||||
[
|
|
||||||
'external_billing' => 'nullable|in:on',
|
|
||||||
'suspend_billing' => 'nullable|in:on',
|
|
||||||
'recur_schedule' => ['required',Rule::in(collect(Invoice::billing_periods)->keys())],
|
|
||||||
'invoice_next_at' => 'nullable|date',
|
|
||||||
'price' => 'nullable|numeric',
|
|
||||||
$o->category => 'array|min:1',
|
|
||||||
]
|
|
||||||
)
|
|
||||||
->toArray()
|
|
||||||
);
|
|
||||||
|
|
||||||
if ($validator->fails()) {
|
$o->type->forceFill($validator->validated());
|
||||||
return redirect()
|
|
||||||
->back()
|
|
||||||
->withErrors($validator)
|
|
||||||
->withInput();
|
|
||||||
}
|
|
||||||
|
|
||||||
$validated = collect($validator->validated());
|
} elseif ($request->post($o->product->category)) {
|
||||||
|
$o->type->forceFill($request->post($o->product->category));
|
||||||
// Store our service type values
|
|
||||||
$o->type->forceFill($validated->get($o->category));
|
|
||||||
|
|
||||||
// Some special handling
|
|
||||||
switch ($o->category) {
|
|
||||||
case 'broadband':
|
|
||||||
// If pppoe is not set, then we dont need username/password
|
|
||||||
$o->type->pppoe = ($x=data_get($validated,$o->category.'.pppoe',FALSE));
|
|
||||||
|
|
||||||
if (! $x) {
|
|
||||||
$o->type->service_username = NULL;
|
|
||||||
$o->type->service_password = NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$o->type->save();
|
$o->type->save();
|
||||||
|
|
||||||
if ($validated->has('invoice_next_at'))
|
if ($request->post('invoice_next_at'))
|
||||||
$o->invoice_next_at = $validated->get('invoice_next_at');
|
$o->invoice_next_at = $request->invoice_next_at;
|
||||||
|
|
||||||
if ($validated->has('recur_schedule'))
|
if ($request->post('recur_schedule'))
|
||||||
$o->recur_schedule = $validated->get('recur_schedule');
|
$o->recur_schedule = $request->recur_schedule;
|
||||||
|
|
||||||
$o->suspend_billing = ($validated->get('suspend_billing') == 'on');
|
$o->suspend_billing = ($request->suspend_billing == 'on');
|
||||||
$o->external_billing = ($validated->get('external_billing') == 'on');
|
$o->external_billing = ($request->external_billing == 'on');
|
||||||
$o->price = $validated->get('price');
|
$o->price = $request->price ?: NULL;
|
||||||
|
|
||||||
// Also update our service start_at date.
|
// Also update our service start_at date.
|
||||||
// @todo We may want to make start_at/stop_at dynamic values calculated by the type records
|
// @todo We may want to make start_at/stop_at dynamic values calculated by the type records
|
||||||
if ($validated->has('start_at'))
|
if ($request->post('start_at'))
|
||||||
$o->start_at = $validated->get('start_at');
|
$o->start_at = $request->start_at;
|
||||||
|
|
||||||
else {
|
else {
|
||||||
// For broadband, start_at is connect_at in the type record
|
// For broadband, start_at is connect_at in the type record
|
||||||
switch ($o->category) {
|
switch ($o->category) {
|
||||||
@ -495,8 +459,6 @@ class ServiceController extends Controller
|
|||||||
|
|
||||||
$o->save();
|
$o->save();
|
||||||
|
|
||||||
return redirect()
|
return redirect()->back()->with('success','Record Updated');
|
||||||
->back()
|
|
||||||
->with('success','Record Updated');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -88,11 +88,10 @@ class Broadband extends Type implements ServiceUsage
|
|||||||
public function validation(): array
|
public function validation(): array
|
||||||
{
|
{
|
||||||
return [
|
return [
|
||||||
'service_number' => 'nullable|string|min:10|max:11',
|
'service_number' => 'nullable|string|min:10|max:10',
|
||||||
'service_address' => 'nullable|string|min:5',
|
'service_address' => 'nullable|string|min:3',
|
||||||
'service_username' => 'exclude_without:pppoe|nullable|string|min:3',
|
'service_username' => 'nullable|string',
|
||||||
'service_password' => 'exclude_without:pppoe|nullable|string|min:8',
|
'service_password' => 'nullable|string',
|
||||||
'pppoe' => 'nullable|in:on',
|
|
||||||
'connect_at' => 'nullable|date',
|
'connect_at' => 'nullable|date',
|
||||||
'start_at' => 'nullable|date',
|
'start_at' => 'nullable|date',
|
||||||
'expire_at' => 'nullable|date|after:start_at',
|
'expire_at' => 'nullable|date|after:start_at',
|
||||||
|
26
composer.lock
generated
26
composer.lock
generated
@ -1534,16 +1534,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/framework",
|
"name": "laravel/framework",
|
||||||
"version": "v11.17.0",
|
"version": "v11.16.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/framework.git",
|
"url": "https://github.com/laravel/framework.git",
|
||||||
"reference": "42f505a0c8afc0743f73e70bec08e641e2870bd6"
|
"reference": "bd4808aaf103ccb5cb4b00bcee46140c070c0ec4"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/framework/zipball/42f505a0c8afc0743f73e70bec08e641e2870bd6",
|
"url": "https://api.github.com/repos/laravel/framework/zipball/bd4808aaf103ccb5cb4b00bcee46140c070c0ec4",
|
||||||
"reference": "42f505a0c8afc0743f73e70bec08e641e2870bd6",
|
"reference": "bd4808aaf103ccb5cb4b00bcee46140c070c0ec4",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1736,7 +1736,7 @@
|
|||||||
"issues": "https://github.com/laravel/framework/issues",
|
"issues": "https://github.com/laravel/framework/issues",
|
||||||
"source": "https://github.com/laravel/framework"
|
"source": "https://github.com/laravel/framework"
|
||||||
},
|
},
|
||||||
"time": "2024-07-23T16:33:27+00:00"
|
"time": "2024-07-16T14:33:07+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/intuit",
|
"name": "laravel/intuit",
|
||||||
@ -1777,16 +1777,16 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/passport",
|
"name": "laravel/passport",
|
||||||
"version": "v12.2.1",
|
"version": "v12.2.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/laravel/passport.git",
|
"url": "https://github.com/laravel/passport.git",
|
||||||
"reference": "795bbb406c8f10167df6062032de803bd7d686f2"
|
"reference": "b24c6462835a16163141fbe588533d16603212b7"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/laravel/passport/zipball/795bbb406c8f10167df6062032de803bd7d686f2",
|
"url": "https://api.github.com/repos/laravel/passport/zipball/b24c6462835a16163141fbe588533d16603212b7",
|
||||||
"reference": "795bbb406c8f10167df6062032de803bd7d686f2",
|
"reference": "b24c6462835a16163141fbe588533d16603212b7",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
@ -1849,7 +1849,7 @@
|
|||||||
"issues": "https://github.com/laravel/passport/issues",
|
"issues": "https://github.com/laravel/passport/issues",
|
||||||
"source": "https://github.com/laravel/passport"
|
"source": "https://github.com/laravel/passport"
|
||||||
},
|
},
|
||||||
"time": "2024-07-10T19:25:36+00:00"
|
"time": "2024-04-17T17:56:14+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "laravel/prompts",
|
"name": "laravel/prompts",
|
||||||
@ -3056,11 +3056,11 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "leenooks/laravel",
|
"name": "leenooks/laravel",
|
||||||
"version": "11.1.4",
|
"version": "11.1.2",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://gitea.dege.au/laravel/leenooks.git",
|
"url": "https://gitea.dege.au/laravel/leenooks.git",
|
||||||
"reference": "f393813311b912f77e4a7082498ed7511482b531"
|
"reference": "f32c29fa8c4b189add48bde26b7b7115be49355f"
|
||||||
},
|
},
|
||||||
"type": "library",
|
"type": "library",
|
||||||
"extra": {
|
"extra": {
|
||||||
@ -3093,7 +3093,7 @@
|
|||||||
"laravel",
|
"laravel",
|
||||||
"leenooks"
|
"leenooks"
|
||||||
],
|
],
|
||||||
"time": "2024-07-24T04:08:04+00:00"
|
"time": "2024-07-23T08:47:36+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "leenooks/passkey",
|
"name": "leenooks/passkey",
|
||||||
|
@ -1,30 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
use Illuminate\Database\Migrations\Migration;
|
|
||||||
use Illuminate\Database\Schema\Blueprint;
|
|
||||||
use Illuminate\Support\Facades\Schema;
|
|
||||||
|
|
||||||
return new class extends Migration
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* Run the migrations.
|
|
||||||
*/
|
|
||||||
public function up(): void
|
|
||||||
{
|
|
||||||
Schema::table('service_broadband', function (Blueprint $table) {
|
|
||||||
$table->boolean('pppoe')->default(FALSE);
|
|
||||||
});
|
|
||||||
|
|
||||||
DB::table('service_broadband')->update(['pppoe'=>TRUE]);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Reverse the migrations.
|
|
||||||
*/
|
|
||||||
public function down(): void
|
|
||||||
{
|
|
||||||
Schema::table('service_broadband', function (Blueprint $table) {
|
|
||||||
$table->dropColumn('pppoe');
|
|
||||||
});
|
|
||||||
}
|
|
||||||
};
|
|
@ -22,7 +22,7 @@
|
|||||||
|
|
||||||
<div class="card card-light card-tabs">
|
<div class="card card-light card-tabs">
|
||||||
<div class="card-header p-0 pt-1">
|
<div class="card-header p-0 pt-1">
|
||||||
<ul class="nav nav-tabs" id="accounts-tab">
|
<ul class="nav nav-tabs" id="accounts-tab" role="tablist">
|
||||||
<li class="pt-2 px-3"><h3 class="card-title">Accounts</h3></li>
|
<li class="pt-2 px-3"><h3 class="card-title">Accounts</h3></li>
|
||||||
@foreach($o->accounts as $ao)
|
@foreach($o->accounts as $ao)
|
||||||
<li class="nav-item">
|
<li class="nav-item">
|
||||||
@ -43,16 +43,16 @@
|
|||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="tab-content" id="accounts-tab-content">
|
<div class="tab-content" id="accounts-tab-content">
|
||||||
@foreach($o->accounts as $ao)
|
@foreach($o->accounts as $ao)
|
||||||
<div @class(['tab-pane','fade','show active'=>! $loop->index]) id="account_{{ $ao->id }}" aria-labelledby="account_{{ $ao->id }}">
|
<div class="tab-pane fade @if(! $loop->index)show active @endif" id="account_{{ $ao->id }}" role="tabpanel" aria-labelledby="account_{{ $ao->id }}">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="card-header bg-white">
|
<div class="card-header bg-white">
|
||||||
<ul class="nav nav-pills">
|
<ul class="nav nav-pills">
|
||||||
<li class="nav-item"><a @class(['nav-link','active'=>! session()->has('supplier_update')]) href="#tab-services" data-toggle="tab">Services</a></li>
|
<li class="nav-item"><a class="nav-link {{ (! session()->has('supplier_update')) ? 'active' : '' }}" href="#tab-services" data-toggle="tab">Services</a></li>
|
||||||
<li class="nav-item"><a class="nav-link" href="#tab-futureinvoice" data-toggle="tab">Future Invoice</a></li>
|
<li class="nav-item"><a class="nav-link" href="#tab-futureinvoice" data-toggle="tab">Future Invoice</a></li>
|
||||||
@canany('reseller','wholesaler')
|
@canany('reseller','wholesaler')
|
||||||
<li class="nav-item ml-auto">
|
<li class="nav-item ml-auto">
|
||||||
<a @class(['nav-link','active'=>session()->has('supplier_update')]) href="#tab-supplier" data-toggle="tab">Supplier</a>
|
<a class="nav-link {{ session()->has('supplier_update') ? 'active' : '' }}" href="#tab-supplier" data-toggle="tab">Supplier</a>
|
||||||
</li>
|
</li>
|
||||||
@endcanany
|
@endcanany
|
||||||
</ul>
|
</ul>
|
||||||
@ -60,7 +60,7 @@
|
|||||||
|
|
||||||
<div class="card-body pl-0 pr-0">
|
<div class="card-body pl-0 pr-0">
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
<div @class(['tab-pane','fade','show active'=>! session()->has('supplier_update')]) id="tab-services">
|
<div class="tab-pane {{ (! session()->has('supplier_update')) ? 'active' : '' }}" id="tab-services">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-xl-7">
|
<div class="col-12 col-xl-7">
|
||||||
@include('theme.backend.adminlte.account.widget.service_active',['o'=>$ao])
|
@include('theme.backend.adminlte.account.widget.service_active',['o'=>$ao])
|
||||||
@ -73,7 +73,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="tab-pane fade" id="tab-futureinvoice">
|
<div class="tab-pane" id="tab-futureinvoice">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-xl-9">
|
<div class="col-12 col-xl-9">
|
||||||
@include('theme.backend.adminlte.invoice.widget.next',['future'=>TRUE])
|
@include('theme.backend.adminlte.invoice.widget.next',['future'=>TRUE])
|
||||||
@ -82,7 +82,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
@canany('reseller','wholesaler')
|
@canany('reseller','wholesaler')
|
||||||
<div @class(['tab-pane','fade','show active'=>session()->pull('supplier_update')]) id="tab-supplier">
|
<div @class(['tab-pane','active'=>session()->pull('supplier_update')]) id="tab-supplier" role="tabpanel">
|
||||||
@include('theme.backend.adminlte.account.widget.supplier',['o'=>$ao])
|
@include('theme.backend.adminlte.account.widget.supplier',['o'=>$ao])
|
||||||
</div>
|
</div>
|
||||||
@endcanany
|
@endcanany
|
||||||
@ -95,7 +95,7 @@
|
|||||||
|
|
||||||
@if($o==$user)
|
@if($o==$user)
|
||||||
@canany('reseller','wholesaler')
|
@canany('reseller','wholesaler')
|
||||||
<div class="tab-pane fade" id="tab-reseller">
|
<div class="tab-pane" id="tab-reseller" role="tabpanel">
|
||||||
@include('theme.backend.adminlte.widget.admin.reseller')
|
@include('theme.backend.adminlte.widget.admin.reseller')
|
||||||
</div>
|
</div>
|
||||||
@endcanany
|
@endcanany
|
||||||
|
@ -1,5 +1,3 @@
|
|||||||
@use(App\Models\Product)
|
|
||||||
|
|
||||||
@extends('adminlte::layouts.app')
|
@extends('adminlte::layouts.app')
|
||||||
|
|
||||||
@section('htmlheader_title')
|
@section('htmlheader_title')
|
||||||
@ -28,18 +26,25 @@
|
|||||||
<div class="card">
|
<div class="card">
|
||||||
<div class="card-header bg-dark d-flex p-0">
|
<div class="card-header bg-dark d-flex p-0">
|
||||||
<ul class="nav nav-pills w-100 p-2">
|
<ul class="nav nav-pills w-100 p-2">
|
||||||
@if ($x=! ($o->suspend_billing || $o->external_billing))
|
{{--
|
||||||
<li class="nav-item"><a @class(['nav-link','active'=>! session()->has('service_update')]) href="#pending_items" data-toggle="tab">Pending Items</a></li>
|
<li class="nav-item"><a class="nav-link active" href="#product" data-toggle="tab">Product</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#traffic" data-toggle="tab">Traffic</a></li>
|
||||||
|
--}}
|
||||||
|
@if (! $o->suspend_billing AND ! $o->external_billing)
|
||||||
|
<li class="nav-item"><a class="nav-link {{ (! session()->has('service_update')) ? 'active' : '' }}" href="#pending_items" data-toggle="tab">Pending Items</a></li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($o->product->hasUsage())
|
@if ($o->product->hasUsage())
|
||||||
<li class="nav-item"><a @class(['nav-link','active'=>! ($x || session()->has('service_update'))]) href="#traffic" data-toggle="tab">Traffic</a></li>
|
<li class="nav-item"><a class="nav-link {{ (! $o->isBilled() && (! session()->has('service_update'))) ? 'active' : '' }}" href="#traffic" data-toggle="tab">Traffic</a></li>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
|
{{--
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#invoices" data-toggle="tab">Invoices</a></li>
|
||||||
|
<li class="nav-item"><a class="nav-link" href="#emails" data-toggle="tab">Emails</a></li>
|
||||||
|
--}}
|
||||||
@can('wholesaler')
|
@can('wholesaler')
|
||||||
<li class="nav-item ml-auto"><a class="nav-link" href="#billing" data-toggle="tab">Billing History</a></li>
|
<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" 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>
|
<li class="nav-item"><a class="nav-link {{ session()->has('service_update') ? 'active' : '' }}" href="#update" data-toggle="tab">Update</a></li>
|
||||||
@endcan
|
@endcan
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
@ -49,51 +54,58 @@
|
|||||||
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">ACTION <span class="caret"></span></a>
|
<a class="nav-link dropdown-toggle" data-toggle="dropdown" href="#">ACTION <span class="caret"></span></a>
|
||||||
|
|
||||||
<div class="dropdown-menu dropdown-menu-right">
|
<div class="dropdown-menu dropdown-menu-right">
|
||||||
@foreach($o->actions() as $stage => $title)
|
@foreach($o->actions() as $stage => $title)
|
||||||
<a class="dropdown-item" tabindex="-1" href="{{ url('u/service',['id'=>$o->id,'action'=>'change','stage'=>$stage]) }}">{{ $title }}</a>
|
<a class="dropdown-item" tabindex="-1" href="{{ url('u/service',['id'=>$o->id,'action'=>'change','stage'=>$stage]) }}">{{ $title }}</a>
|
||||||
@endforeach
|
@endforeach
|
||||||
{{-- <div class="dropdown-divider"></div> --}}
|
{{-- <div class="dropdown-divider"></div> --}}
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div><!-- /.card-header -->
|
||||||
|
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
@if ($x=! ($o->suspend_billing || $o->external_billing))
|
<div class="tab-pane fade" id="product" role="tabpanel">
|
||||||
<div @class(['tab-pane','fade','show active'=>! session()->has('service_update')]) id="pending_items">
|
Product.
|
||||||
|
</div>
|
||||||
|
@if (! $o->suspend_billing AND ! $o->external_billing)
|
||||||
|
<div class="tab-pane fade {{ (! session()->has('service_update')) ? 'active show' : '' }}" id="pending_items" role="tabpanel">
|
||||||
@include('theme.backend.adminlte.service.widget.invoice')
|
@include('theme.backend.adminlte.service.widget.invoice')
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
|
||||||
@if ($o->product->hasUsage())
|
@if ($o->product->hasUsage())
|
||||||
<div @class(['tab-pane','fade','show active'=>! ($x || session()->has('service_update'))]) id="traffic">
|
<div class="tab-pane fade {{ (! $o->isBilled() && (! session()->has('service_update'))) ? 'active show' : '' }}" id="traffic" role="tabpanel">
|
||||||
@if ($o->type->usage(30)->count())
|
@if ($o->type->usage(30)->count())
|
||||||
@include('theme.backend.adminlte.service.widget.'.$o->product->category.'.usagegraph',['o'=>$o->type])
|
@include('theme.backend.adminlte.service.widget.'.$o->product->category.'.usagegraph',['o'=>$o->type])
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
@endif
|
@endif
|
||||||
|
<div class="tab-pane fade" id="invoices" role="tabpanel">
|
||||||
|
Invoices.
|
||||||
|
</div>
|
||||||
|
<div class="tab-pane fade" id="emails" role="tabpanel">
|
||||||
|
Email.
|
||||||
|
</div>
|
||||||
@can('wholesaler')
|
@can('wholesaler')
|
||||||
<div class="tab-pane fade" id="billing">
|
<div class="tab-pane fade" id="billing" role="tabpanel">
|
||||||
@include('theme.backend.adminlte.service.widget.billinghistory',['o'=>$o])
|
@include('theme.backend.adminlte.service.widget.billinghistory',['o'=>$o])
|
||||||
</div>
|
</div>
|
||||||
|
<div class="tab-pane fade" id="internal" role="tabpanel">
|
||||||
<div class="tab-pane fade" id="internal">
|
|
||||||
@if(($x=$o->changes()->where('service__change.active',TRUE)->where('complete',FALSE)->get()->pop()))
|
@if(($x=$o->changes()->where('service__change.active',TRUE)->where('complete',FALSE)->get()->pop()))
|
||||||
@include('theme.backend.adminlte.service.widget.internal',['o'=>$o,'p'=>$x])
|
@include('theme.backend.adminlte.service.widget.internal',['o'=>$o,'p'=>$x])
|
||||||
@else
|
@else
|
||||||
@include('theme.backend.adminlte.service.widget.internal',['o'=>$o,'p'=>new Product()])
|
@include('theme.backend.adminlte.service.widget.internal',['o'=>$o,'p'=>new \App\Models\Product()])
|
||||||
@endif
|
@endif
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div @class(['tab-pane','fade','show active'=>session()->has('service_update')]) id="update">
|
<div class="tab-pane fade {{ session()->pull('service_update') ? 'active show' : '' }}" id="update" role="tabpanel">
|
||||||
@include('theme.backend.adminlte.service.widget.update')
|
@include('theme.backend.adminlte.service.widget.update')
|
||||||
</div>
|
</div>
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!-- /.card -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,28 +1,49 @@
|
|||||||
<!-- $o=Service\Broadband::class -->
|
<!-- $o=Service\Broadband::class -->
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
||||||
<x-leenooks::form.text id="service_number" name="broadband[service_number]" icon="fa-phone" label="Service Number" old="broadband.service_number" :value="$o->service_number"/>
|
@include('adminlte::widget.form_text',[
|
||||||
|
'label'=>'Service Number',
|
||||||
|
'icon'=>'fas fa-phone',
|
||||||
|
'id'=>'service_number',
|
||||||
|
'old'=>'broadband.service_number',
|
||||||
|
'name'=>'broadband[service_number]',
|
||||||
|
'value'=>$o->service_number ?? '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-9 col-md-6 col-xl-7">
|
<div class="col-12 col-sm-9 col-md-6 col-xl-7">
|
||||||
<x-leenooks::form.text id="service_address" name="broadband[service_address]" icon="fa-map" label="Service Address" old="broadband.service_address" :value="$o->service_address"/>
|
@include('adminlte::widget.form_text',[
|
||||||
</div>
|
'label'=>'Service Address',
|
||||||
</div>
|
'icon'=>'fas fa-map',
|
||||||
|
'id'=>'service_address',
|
||||||
<div class="row">
|
'old'=>'broadband.service_address',
|
||||||
<div class="col">
|
'name'=>'broadband[service_address]',
|
||||||
Connection Type
|
'value'=>$o->service_address ?? '',
|
||||||
<x-leenooks::form.toggle id="pppoe" name="broadband[pppoe]" label="PPPoE" old="broadband.pppoe" :value="$o->pppoe"/>
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-9 col-md-12 col-xl-7">
|
<div class="col-12 col-sm-9 col-md-12 col-xl-7">
|
||||||
<x-leenooks::form.text id="service_username" name="broadband[service_username]" icon="fa-user" label="Service Username" old="broadband.service_username" :value="$o->service_username"/>
|
@include('adminlte::widget.form_text',[
|
||||||
|
'label'=>'Service Username',
|
||||||
|
'icon'=>'fas fa-user',
|
||||||
|
'id'=>'service_username',
|
||||||
|
'old'=>'broadband.service_username',
|
||||||
|
'name'=>'broadband[service_username]',
|
||||||
|
'value'=>$o->service_username ?? '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-9 col-md-5 col-xl-5">
|
<div class="col-12 col-sm-9 col-md-5 col-xl-5">
|
||||||
<x-leenooks::form.text id="service_password" name="broadband[service_password]" icon="fa-lock" label="Service Password" old="broadband.service_password" :value="$o->service_password"/>
|
@include('adminlte::widget.form_text',[
|
||||||
|
'label'=>'Service Password',
|
||||||
|
'icon'=>'fas fa-lock',
|
||||||
|
'id'=>'service_password',
|
||||||
|
'old'=>'broadband.service_password',
|
||||||
|
'name'=>'broadband[service_password]',
|
||||||
|
'value'=>$o->service_password ?? '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -31,11 +52,25 @@
|
|||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
||||||
<x-leenooks::form.date id="connect_at" name="broadband[connect_at]" icon="fa-calendar" label="Connect Date" old="broadband.connect_at" :value="$o->connect_at?->format('Y-m-d')"/>
|
@include('adminlte::widget.form_date',[
|
||||||
|
'label'=>'Connect Date',
|
||||||
|
'icon'=>'fas fa-calendar',
|
||||||
|
'id'=>'connect_at',
|
||||||
|
'old'=>'broadband.connect_at',
|
||||||
|
'name'=>'broadband[connect_at]',
|
||||||
|
'value'=>$o->connect_at ? $o->connect_at->format('Y-m-d') : '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
||||||
<x-leenooks::form.date id="expire_at" name="broadband[expire_at]" icon="fa-calendar" label="Contract End" old="broadband.expire_at" :value="$o->expire_at?->format('Y-m-d') ?: ($o->connect_at?->addMonths($o->contract_term)->format('Y-m-d'))"/>
|
@include('adminlte::widget.form_date',[
|
||||||
|
'label'=>'Contract End',
|
||||||
|
'icon'=>'fas fa-calendar',
|
||||||
|
'id'=>'expire_at',
|
||||||
|
'old'=>'broadband.expire_at',
|
||||||
|
'name'=>'broadband[expire_at]',
|
||||||
|
'value'=>$o->expire_at ? $o->expire_at->format('Y-m-d') : ($o->connect_at ? $o->connect_at->addMonths($o->contract_term)->format('Y-m-d') : ''),
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -43,39 +78,26 @@
|
|||||||
<p class="h6">IP Address</p>
|
<p class="h6">IP Address</p>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 col-lg-5">
|
<div class="col-12 col-lg-5">
|
||||||
<x-leenooks::form.text id="ipaddress" name="broadband[ipaddress]" icon="fa-map-marker" label="IPv4 Address" old="broadband.ipaddress" :value="$o->ipaddress"/>
|
@include('adminlte::widget.form_text',[
|
||||||
|
'label'=>'IPv4 Address',
|
||||||
|
'icon'=>'fas fa-map-marker',
|
||||||
|
'id'=>'ipaddress',
|
||||||
|
'old'=>'broadband.ipaddress',
|
||||||
|
'name'=>'broadband[ipaddress]',
|
||||||
|
'value'=>$o->ipaddress ?? '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-12 col-lg-7">
|
<div class="col-12 col-lg-7">
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<x-leenooks::form.text id="ip6address" name="broadband[ip6address]" icon="fa-map-marker-alt" label="IPv6 Address" :value="$o->ip6address"/>
|
@include('adminlte::widget.form_text',[
|
||||||
|
'label'=>'IPv6 Address',
|
||||||
|
'icon'=>'fas fa-map-marker-alt',
|
||||||
|
'id'=>'ip6address',
|
||||||
|
'old'=>'broadband.ip6address',
|
||||||
|
'name'=>'broadband[ip6address]',
|
||||||
|
'value'=>$o->ip6address ?? '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@section('page-scripts')
|
|
||||||
<script type="text/javascript">
|
|
||||||
function toggle_pppoe(item) {
|
|
||||||
if (item.is(':checked')) {
|
|
||||||
$('#service_username').closest('.form-group').parent().removeClass('d-none');
|
|
||||||
$('#service_password').closest('.form-group').parent().removeClass('d-none');
|
|
||||||
|
|
||||||
item.closest('.form-group').removeClass('mb-0');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$('#service_username').closest('.form-group').parent().addClass('d-none');
|
|
||||||
$('#service_password').closest('.form-group').parent().addClass('d-none');
|
|
||||||
|
|
||||||
item.closest('.form-group').addClass('mb-0');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
toggle_pppoe($('#pppoe'));
|
|
||||||
|
|
||||||
$('#pppoe').on('click',function(item) {
|
|
||||||
toggle_pppoe($(this));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@append
|
|
@ -1,30 +1,56 @@
|
|||||||
<!-- $o=Service::class -->
|
|
||||||
@use(App\Models\Invoice)
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<h4>Update Service details <x-leenooks::button.success class="float-right"/></h4>
|
<h4>Update Service details</h4>
|
||||||
<hr>
|
|
||||||
|
<form class="g-0 needs-validation" method="POST" action="{{ url('a/service/update',[$o->id]) }}">
|
||||||
|
@include('adminlte::widget.success')
|
||||||
|
|
||||||
<form method="POST" action="{{ url('a/service/update',[$o->id]) }}">
|
|
||||||
@csrf
|
@csrf
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<!-- External Billing -->
|
<!-- External Billing -->
|
||||||
<div class="col-2">
|
<div class="col-2">
|
||||||
<x-leenooks::form.toggle id="external_billing" name="external_billing" label="External Billing" :value="$o->external_billing"/>
|
@include('adminlte::widget.form_toggle',[
|
||||||
<x-leenooks::form.toggle id="suspend_billing" name="suspend_billing" label="Suspend Billing" :value="$o->suspend_billing"/>
|
'label'=>'External Billing',
|
||||||
|
'id'=>'external_billing',
|
||||||
|
'old'=>'external_billing',
|
||||||
|
'name'=>'external_billing',
|
||||||
|
'value'=>$o->external_billing ?? '',
|
||||||
|
])
|
||||||
|
|
||||||
|
<!-- Suspend Billing -->
|
||||||
|
@include('adminlte::widget.form_toggle',[
|
||||||
|
'label'=>'Suspend Billing',
|
||||||
|
'id'=>'suspend_billing',
|
||||||
|
'old'=>'suspend_billing',
|
||||||
|
'name'=>'suspend_billing',
|
||||||
|
'value'=>$o->suspend_billing ?? '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-1"></div>
|
<div class="col-1"></div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
||||||
<x-leenooks::form.date id="invoice_next_at" name="invoice_next_at" icon="fa-calendar" label="Billing Start Date" :value="($o->invoice_next_at ?: $o->connect_at)?->format('Y-m-d')"/>
|
@include('adminlte::widget.form_date',[
|
||||||
|
'label'=>'Billing Start Date',
|
||||||
|
'icon'=>'fas fa-calendar',
|
||||||
|
'id'=>'invoice_next_at',
|
||||||
|
'old'=>'invoice_next_at',
|
||||||
|
'name'=>'invoice_next_at',
|
||||||
|
'value'=>$o->invoice_next_at ? $o->invoice_next_at->format('Y-m-d') : ($o->connect_at ? $o->connect_at->format('Y-m-d') : ''),
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<!-- Price -->
|
<!-- Price -->
|
||||||
<div class="col-12 col-sm-9 col-md-12 col-xl-3">
|
<div class="col-12 col-sm-9 col-md-12 col-xl-3">
|
||||||
<x-leenooks::form.text name="price" icon="fa-dollar-sign" label="Price" :value="$o->price"/>
|
@include('adminlte::widget.form_text',[
|
||||||
|
'label'=>'Price',
|
||||||
|
'icon'=>'fas fa-dollar-sign',
|
||||||
|
'id'=>'price',
|
||||||
|
'old'=>'price',
|
||||||
|
'name'=>'price',
|
||||||
|
'value'=>$o->price ?? '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -32,7 +58,15 @@
|
|||||||
<div class="col-3"></div>
|
<div class="col-3"></div>
|
||||||
|
|
||||||
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
<div class="col-12 col-sm-9 col-md-6 col-xl-5">
|
||||||
<x-leenooks::form.select id="recur_schedule" name="recur_schedule" icon="fa-redo" label="Renew Term" :value="$o->recur_schedule" :options="collect(Invoice::billing_periods)->map(fn($item,$key)=>['id'=>$key,'value'=>$item['name']])"/>
|
@include('adminlte::widget.form_select',[
|
||||||
|
'label'=>'Renew Term',
|
||||||
|
'icon'=>'fas fa-redo',
|
||||||
|
'id'=>'recur_schedule',
|
||||||
|
'old'=>'recur_schedule',
|
||||||
|
'name'=>'recur_schedule',
|
||||||
|
'options'=>collect(\App\Models\Invoice::billing_periods)->transform(function($item,$key) { return ['id'=>$key,'value'=>$item['name']]; }),
|
||||||
|
'value'=>$o->recur_schedule ?? '',
|
||||||
|
])
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -41,64 +75,12 @@
|
|||||||
@includeIf('theme.backend.adminlte.service.widget.'.$o->product->category.'.update',['o'=>$o->type])
|
@includeIf('theme.backend.adminlte.service.widget.'.$o->product->category.'.update',['o'=>$o->type])
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col">
|
<div class="col-12">
|
||||||
@can('wholesaler')
|
@can('wholesaler')
|
||||||
<x-leenooks::button.reset/>
|
<button type="submit" name="submit" class="btn btn-success mr-0 float-right">@if ($site->exists)Save @else Add @endif</button>
|
||||||
<x-leenooks::button.submit class="float-right">Save</x-leenooks::button.submit>
|
|
||||||
@endcan
|
@endcan
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@section('page-scripts')
|
|
||||||
<script type="text/javascript">
|
|
||||||
function toggle_billing_external(item) {
|
|
||||||
if (item.is(':checked')) {
|
|
||||||
$('#suspend_billing').closest('.form-group').addClass('d-none');
|
|
||||||
$('#invoice_next_at').closest('.form-group').parent().addClass('d-none');
|
|
||||||
$('#price').closest('.form-group').parent().addClass('d-none');
|
|
||||||
$('#recur_schedule').closest('.form-group').parent().addClass('d-none');
|
|
||||||
|
|
||||||
item.closest('.form-group').addClass('mb-0');
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$('#suspend_billing').closest('.form-group').removeClass('d-none');
|
|
||||||
$('#invoice_next_at').closest('.form-group').parent().removeClass('d-none');
|
|
||||||
$('#price').closest('.form-group').parent().removeClass('d-none');
|
|
||||||
$('#recur_schedule').closest('.form-group').parent().removeClass('d-none');
|
|
||||||
|
|
||||||
item.closest('.form-group').removeClass('mb-0');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function toggle_billing_suspend(item) {
|
|
||||||
if (item.is(':checked')) {
|
|
||||||
$('#invoice_next_at').prop('readonly',true);
|
|
||||||
$('#price').prop('readonly',true);
|
|
||||||
|
|
||||||
recur_schedule_readonly(true);
|
|
||||||
|
|
||||||
} else {
|
|
||||||
$('#invoice_next_at').prop('readonly',false);
|
|
||||||
$('#price').prop('readonly',false);
|
|
||||||
|
|
||||||
recur_schedule_readonly(false);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$(document).ready(function() {
|
|
||||||
toggle_billing_external($('#external_billing'));
|
|
||||||
toggle_billing_suspend($('#suspend_billing'));
|
|
||||||
|
|
||||||
$('#external_billing').on('click',function(item) {
|
|
||||||
toggle_billing_external($(this));
|
|
||||||
});
|
|
||||||
|
|
||||||
$('#suspend_billing').on('click',function(item) {
|
|
||||||
toggle_billing_suspend($(this));
|
|
||||||
});
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
@append
|
|
@ -31,7 +31,7 @@ use App\Models\Supplier;
|
|||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
// Global Routes
|
// Default Setup
|
||||||
Auth::routes([
|
Auth::routes([
|
||||||
'login' => true,
|
'login' => true,
|
||||||
'logout' => true,
|
'logout' => true,
|
||||||
@ -40,28 +40,20 @@ Auth::routes([
|
|||||||
'confirm' => false, // for additional password confirmations
|
'confirm' => false, // for additional password confirmations
|
||||||
'verify' => false, // for email verification
|
'verify' => false, // for email verification
|
||||||
]);
|
]);
|
||||||
|
|
||||||
Route::get('logout',[LoginController::class,'logout'])
|
Route::get('logout',[LoginController::class,'logout'])
|
||||||
->name('logout-get');
|
->name('logout-get');
|
||||||
|
|
||||||
// Frontend Routes (Non-Authed Users)
|
Route::redirect('passkey/loggedin','/home');
|
||||||
Route::view('/','theme.frontend.metronic.welcome.home');
|
|
||||||
|
|
||||||
// Logged in users home
|
|
||||||
Route::redirect('home','u/home');
|
|
||||||
Route::redirect('passkey/loggedin','u/home');
|
|
||||||
|
|
||||||
Route::get('search',[SearchController::class,'search']);
|
|
||||||
|
|
||||||
Route::get('pay/paypal/authorise',[PaypalController::class,'authorise']);
|
|
||||||
Route::get('pay/paypal/cancel',[PaypalController::class,'cancel']);
|
|
||||||
Route::get('pay/paypal/capture',[PaypalController::class,'capture']);
|
|
||||||
|
|
||||||
// Account linking to OPENID host
|
// Account linking to OPENID host
|
||||||
Route::get('auth/{socialProvider}',[SocialLoginController::class,'redirectToProvider']);
|
Route::group([],function() {
|
||||||
Route::get('auth/{socialProvider}/callback',[SocialLoginController::class,'handleProviderCallback']);
|
Route::get('auth/{socialProvider}',[SocialLoginController::class,'redirectToProvider']);
|
||||||
Route::get('auth/{socialProvider}/token',[SocialLoginController::class,'handleBearerTokenCallback']);
|
Route::get('auth/{socialProvider}/callback',[SocialLoginController::class,'handleProviderCallback']);
|
||||||
Route::get('auth/{socialProvider}/link',[SocialLoginController::class,'link']);
|
Route::get('auth/{socialProvider}/token',[SocialLoginController::class,'handleBearerTokenCallback']);
|
||||||
Route::post('auth/{socialProvider}/linkcomplete',[SocialLoginController::class,'linkcomplete']);
|
Route::get('auth/{socialProvider}/link',[SocialLoginController::class,'link']);
|
||||||
|
Route::post('auth/{socialProvider}/linkcomplete',[SocialLoginController::class,'linkcomplete']);
|
||||||
|
});
|
||||||
|
|
||||||
// Return from user switch
|
// Return from user switch
|
||||||
Route::get('admin/switch/stop',[SwitchUserController::class,'switch_stop'])
|
Route::get('admin/switch/stop',[SwitchUserController::class,'switch_stop'])
|
||||||
@ -201,7 +193,6 @@ Route::group(['middleware'=>['auth'],'prefix'=>'u'],function() {
|
|||||||
->where('o','[0-9]+')
|
->where('o','[0-9]+')
|
||||||
->middleware('can:progress,o,status');
|
->middleware('can:progress,o,status');
|
||||||
|
|
||||||
// User settings
|
|
||||||
Route::view('settings','theme.backend.adminlte.user.settings');
|
Route::view('settings','theme.backend.adminlte.user.settings');
|
||||||
Route::post('settings/{o}',[UserController::class,'edit']);
|
Route::post('settings/{o}',[UserController::class,'edit']);
|
||||||
});
|
});
|
||||||
@ -213,9 +204,20 @@ Route::group(['prefix'=>'u'],function() {
|
|||||||
->where('code','[0-9A-Z]{6}');
|
->where('code','[0-9A-Z]{6}');
|
||||||
});
|
});
|
||||||
|
|
||||||
// Frontend
|
// Frontend Routes (Non-Authed Users)
|
||||||
Route::get('order',[OrderController::class,'index']);
|
Route::view('/','theme.frontend.metronic.welcome.home');
|
||||||
Route::post('order',[OrderController::class,'submit']);
|
|
||||||
|
Route::group([],function() {
|
||||||
|
Route::get('order',[OrderController::class,'index']);
|
||||||
|
Route::post('order',[OrderController::class,'submit']);
|
||||||
|
});
|
||||||
|
|
||||||
Route::get('product_order/{o}',[OrderController::class,'product_order']);
|
Route::get('product_order/{o}',[OrderController::class,'product_order']);
|
||||||
Route::get('product_info/{o}',[OrderController::class,'product_info']);
|
Route::get('product_info/{o}',[OrderController::class,'product_info']);
|
||||||
|
Route::redirect('home','u/home');
|
||||||
|
|
||||||
|
Route::get('search',[SearchController::class,'search']);
|
||||||
|
|
||||||
|
Route::get('pay/paypal/authorise',[PaypalController::class,'authorise']);
|
||||||
|
Route::get('pay/paypal/cancel',[PaypalController::class,'cancel']);
|
||||||
|
Route::get('pay/paypal/capture',[PaypalController::class,'capture']);
|
||||||
|
Loading…
Reference in New Issue
Block a user