Update version and API.

This commit is contained in:
James Cole
2020-07-12 17:34:06 +02:00
parent c4979bdd27
commit da77bcde04
4 changed files with 43 additions and 7 deletions

View File

@@ -118,9 +118,9 @@ class IndexController extends Controller
/**
* @return \Illuminate\Contracts\Foundation\Application|Factory|View
*/
public function emptyIndex()
public function emptyIndex(?string $objectType = null)
{
return view('accounts.empty-index');
return view('accounts.empty-index', compact('objectType'));
}
/**
@@ -133,6 +133,11 @@ class IndexController extends Controller
*/
public function index(Request $request, string $objectType)
{
// temp catch for layout.
if ('v2' === config('firefly.layout')) {
return $this->emptyIndex($objectType);
}
$objectType = $objectType ?? 'asset';
$subTitle = (string) trans(sprintf('firefly.%s_accounts', $objectType));
$subTitleIcon = config(sprintf('firefly.subIconsByIdentifier.%s', $objectType));