updated subfleet admin design

This commit is contained in:
Nabeel Shahzad
2017-11-22 11:52:02 -06:00
parent 321f2e94f5
commit 5e990164ee
12 changed files with 131 additions and 103 deletions

View File

@@ -20,6 +20,23 @@ class SubfleetController extends BaseController
/** @var SubfleetRepository */
private $subfleetRepo, $fareRepo;
/**
* SubfleetController constructor.
*
* @param SubfleetRepository $subfleetRepo
* @param FareRepository $fareRepo
*/
public function __construct(
SubfleetRepository $subfleetRepo,
FareRepository $fareRepo
) {
$this->subfleetRepo = $subfleetRepo;
$this->fareRepo = $fareRepo;
}
/**
* @return array
*/
protected function getFuelTypes()
{
$retval = [];
@@ -30,6 +47,9 @@ class SubfleetController extends BaseController
return $retval;
}
/**
* Get all the fares that haven't been assigned to a given subfleet
*/
protected function getAvailFares($subfleet)
{
$retval = [];
@@ -45,15 +65,6 @@ class SubfleetController extends BaseController
return $retval;
}
public function __construct(
SubfleetRepository $subfleetRepo,
FareRepository $fareRepo
)
{
$this->subfleetRepo = $subfleetRepo;
$this->fareRepo = $fareRepo;
}
/**
* Display a listing of the Subfleet.
*
@@ -214,7 +225,8 @@ class SubfleetController extends BaseController
$subfleet = $this->subfleetRepo->findWithoutFail($id);
if (empty($subfleet)) {
return view('admin.aircraft.fares', ['fares' => []]);
return $this->return_fares_view($subfleet);
//return view('admin.aircraft.fares', ['fares' => []]);
}
$fare_svc = app('App\Services\FareService');