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

@@ -4,7 +4,6 @@ namespace App\Http\Controllers;
use Clarkeash\Doorman\Exceptions\{DoormanException,ExpiredInviteCode};
use Clarkeash\Doorman\Facades\Doorman;
use Illuminate\Contracts\View\Factory;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Log;
use Illuminate\View\View;
@@ -24,7 +23,8 @@ class HomeController extends Controller
/**
* Logged in users home page
*
* @return Factory|View
* @param User $o
* @return View
*/
public function home(User $o): View
{
@@ -33,7 +33,7 @@ class HomeController extends Controller
$o->load(['services.invoice_items','services.type']);
return View('u.home',['o'=>$o]);
return View('home',['o'=>$o]);
}
/**
@@ -62,22 +62,6 @@ class HomeController extends Controller
return $this->invoice($o);
}
/**
* Return details on the users service
*
* @param Service $o
* @return View
*/
public function service(Service $o): View
{
$breadcrumb = collect();
$breadcrumb->put($o->account->user->full_name,url('u/home',$o->account->user_id));
return View('u.service.home')
->with('breadcrumb',$breadcrumb)
->with('o',$o);
}
/**
* Progress the order to the next stage
*

View File

@@ -84,7 +84,8 @@ class ServiceController extends Controller
return redirect()->to(url('u/service',[$o->id]));
}
return view('a.service.change_pending')
return view('service.change_pending')
->with('breadcrumb',collect()->merge($o->account->breadcrumb))
->with('o',$o);
}
@@ -117,7 +118,7 @@ class ServiceController extends Controller
return redirect('u/service/'.$o->id)->with('success','Cancellation lodged');
}
return view('u.service.cancel_request')
return view('service.cancel_request')
->with('o',$o);
}
@@ -220,7 +221,8 @@ class ServiceController extends Controller
switch (get_class($o->type)) {
default:
return view('u.service.change_request')
return view('service.change_request')
->with('breadcrumb',collect()->merge($o->account->breadcrumb))
->with('o',$o);
}
}
@@ -275,7 +277,7 @@ class ServiceController extends Controller
->with(['service.account','registrar'])
->get();
return view('r.service.domain.list')
return view('service.domain.list')
->with('o',$o);
}
@@ -289,7 +291,20 @@ class ServiceController extends Controller
->with(['service.account','service.product.type.supplied.supplier_detail.supplier','tld'])
->get();
return view('r.service.email.list')
return view('service.email.list')
->with('o',$o);
}
/**
* Return details on the users service
*
* @param Service $o
* @return View
*/
public function home(Service $o): View
{
return View('service.home')
->with('breadcrumb',collect()->merge($o->account->breadcrumb))
->with('o',$o);
}
@@ -303,7 +318,7 @@ class ServiceController extends Controller
->with(['service.account','service.product.type.supplied.supplier_detail.supplier','tld'])
->get();
return view('r.service.host.list')
return view('service.host.list')
->with('o',$o);
}