Make it easier to switch between v1/v2 layout.

This commit is contained in:
James Cole
2021-01-31 20:35:54 +01:00
parent fd8a59924d
commit ffe18c63a5
88 changed files with 176 additions and 176 deletions

View File

@@ -88,7 +88,7 @@ class ReportController extends Controller
public function auditReport(Collection $accounts, Carbon $start, Carbon $end)
{
if ($end < $start) {
return view('error')->with('message', (string) trans('firefly.end_after_start_date')); // @codeCoverageIgnore
return prefixView('error')->with('message', (string) trans('firefly.end_after_start_date')); // @codeCoverageIgnore
}
$this->repository->cleanupBudgets();
@@ -124,7 +124,7 @@ class ReportController extends Controller
public function budgetReport(Collection $accounts, Collection $budgets, Carbon $start, Carbon $end)
{
if ($end < $start) {
return view('error')->with('message', (string) trans('firefly.end_after_start_date')); // @codeCoverageIgnore
return prefixView('error')->with('message', (string) trans('firefly.end_after_start_date')); // @codeCoverageIgnore
}
$this->repository->cleanupBudgets();
@@ -161,7 +161,7 @@ class ReportController extends Controller
public function categoryReport(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
{
if ($end < $start) {
return view('error')->with('message', (string) trans('firefly.end_after_start_date')); // @codeCoverageIgnore
return prefixView('error')->with('message', (string) trans('firefly.end_after_start_date')); // @codeCoverageIgnore
}
$this->repository->cleanupBudgets();
@@ -197,7 +197,7 @@ class ReportController extends Controller
public function defaultReport(Collection $accounts, Carbon $start, Carbon $end)
{
if ($end < $start) {
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
return prefixView('error')->with('message', (string) trans('firefly.end_after_start_date'));
}
$this->repository->cleanupBudgets();
@@ -291,7 +291,7 @@ class ReportController extends Controller
$accountList = implode(',', $accounts->pluck('id')->toArray());
$this->repository->cleanupBudgets();
return view('reports.index', compact('months', 'accounts', 'start', 'accountList', 'groupedAccounts', 'customFiscalYear'));
return prefixView('reports.index', compact('months', 'accounts', 'start', 'accountList', 'groupedAccounts', 'customFiscalYear'));
}
/**
@@ -379,7 +379,7 @@ class ReportController extends Controller
}
if ($request->getEndDate() < $request->getStartDate()) {
return view('error')->with('message', (string) trans('firefly.end_after_start_date'));
return prefixView('error')->with('message', (string) trans('firefly.end_after_start_date'));
}
switch ($reportType) {
@@ -422,7 +422,7 @@ class ReportController extends Controller
public function tagReport(Collection $accounts, Collection $tags, Carbon $start, Carbon $end)
{
if ($end < $start) {
return view('error')->with('message', (string) trans('firefly.end_after_start_date')); // @codeCoverageIgnore
return prefixView('error')->with('message', (string) trans('firefly.end_after_start_date')); // @codeCoverageIgnore
}
$this->repository->cleanupBudgets();