mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-19 10:53:37 +00:00
Fix routes for #718
This commit is contained in:
@@ -217,7 +217,7 @@ class BillController extends Controller
|
|||||||
$collector->setAllAssetAccounts()->setBills(new Collection([$bill]))->setLimit($pageSize)->setPage($page)->withBudgetInformation()
|
$collector->setAllAssetAccounts()->setBills(new Collection([$bill]))->setLimit($pageSize)->setPage($page)->withBudgetInformation()
|
||||||
->withCategoryInformation();
|
->withCategoryInformation();
|
||||||
$journals = $collector->getPaginatedJournals();
|
$journals = $collector->getPaginatedJournals();
|
||||||
$journals->setPath('/bills/show/' . $bill->id);
|
$journals->setPath(route('bills.show', [$bill->id]));
|
||||||
|
|
||||||
$bill->nextExpectedMatch = $repository->nextExpectedMatch($bill, new Carbon);
|
$bill->nextExpectedMatch = $repository->nextExpectedMatch($bill, new Carbon);
|
||||||
$hideBill = true;
|
$hideBill = true;
|
||||||
|
@@ -308,7 +308,7 @@ class BudgetController extends Controller
|
|||||||
$collector->setAllAssetAccounts()->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setLimit($pageSize)->setPage($page)
|
$collector->setAllAssetAccounts()->setRange($start, $end)->setTypes([TransactionType::WITHDRAWAL])->setLimit($pageSize)->setPage($page)
|
||||||
->withoutBudget()->withOpposingAccount();
|
->withoutBudget()->withOpposingAccount();
|
||||||
$journals = $collector->getPaginatedJournals();
|
$journals = $collector->getPaginatedJournals();
|
||||||
$journals->setPath('/budgets/list/no-budget');
|
$journals->setPath(route('budgets.no-budget'));
|
||||||
$count = $journals->getCollection()->count();
|
$count = $journals->getCollection()->count();
|
||||||
if ($count === 0 && $loop < 3) {
|
if ($count === 0 && $loop < 3) {
|
||||||
$start->subDay();
|
$start->subDay();
|
||||||
@@ -366,7 +366,7 @@ class BudgetController extends Controller
|
|||||||
$collector = app(JournalCollectorInterface::class);
|
$collector = app(JournalCollectorInterface::class);
|
||||||
$collector->setAllAssetAccounts()->setRange($start, $end)->setBudget($budget)->setLimit($pageSize)->setPage($page)->withCategoryInformation();
|
$collector->setAllAssetAccounts()->setRange($start, $end)->setBudget($budget)->setLimit($pageSize)->setPage($page)->withCategoryInformation();
|
||||||
$journals = $collector->getPaginatedJournals();
|
$journals = $collector->getPaginatedJournals();
|
||||||
$journals->setPath('/budgets/show/' . $budget->id);
|
$journals->setPath(route('budgets.show', [$budget->id]));
|
||||||
|
|
||||||
|
|
||||||
$subTitle = trans('firefly.all_journals_for_budget', ['name' => $budget->name]);
|
$subTitle = trans('firefly.all_journals_for_budget', ['name' => $budget->name]);
|
||||||
@@ -404,7 +404,7 @@ class BudgetController extends Controller
|
|||||||
$collector->setAllAssetAccounts()->setRange($budgetLimit->start_date, $budgetLimit->end_date)
|
$collector->setAllAssetAccounts()->setRange($budgetLimit->start_date, $budgetLimit->end_date)
|
||||||
->setBudget($budget)->setLimit($pageSize)->setPage($page)->withCategoryInformation();
|
->setBudget($budget)->setLimit($pageSize)->setPage($page)->withCategoryInformation();
|
||||||
$journals = $collector->getPaginatedJournals();
|
$journals = $collector->getPaginatedJournals();
|
||||||
$journals->setPath('/budgets/show/' . $budget->id . '/' . $budgetLimit->id);
|
$journals->setPath(route('budgets.show', [$budget->id, $budgetLimit->id]));
|
||||||
|
|
||||||
|
|
||||||
$start = session('first', Carbon::create()->startOfYear());
|
$start = session('first', Carbon::create()->startOfYear());
|
||||||
|
@@ -214,7 +214,7 @@ class CategoryController extends Controller
|
|||||||
$collector->setAllAssetAccounts()->setRange($start, $end)->setLimit($pageSize)->setPage($page)->withoutCategory()->withOpposingAccount();
|
$collector->setAllAssetAccounts()->setRange($start, $end)->setLimit($pageSize)->setPage($page)->withoutCategory()->withOpposingAccount();
|
||||||
$collector->removeFilter(InternalTransferFilter::class);
|
$collector->removeFilter(InternalTransferFilter::class);
|
||||||
$journals = $collector->getPaginatedJournals();
|
$journals = $collector->getPaginatedJournals();
|
||||||
$journals->setPath('/categories/list/no-category');
|
$journals->setPath(route('categories.no-category'));
|
||||||
$count = $journals->getCollection()->count();
|
$count = $journals->getCollection()->count();
|
||||||
if ($count === 0 && $loop < 3) {
|
if ($count === 0 && $loop < 3) {
|
||||||
$start->subDay();
|
$start->subDay();
|
||||||
@@ -298,7 +298,7 @@ class CategoryController extends Controller
|
|||||||
->setCategory($category)->withBudgetInformation()->withCategoryInformation();
|
->setCategory($category)->withBudgetInformation()->withCategoryInformation();
|
||||||
$collector->removeFilter(InternalTransferFilter::class);
|
$collector->removeFilter(InternalTransferFilter::class);
|
||||||
$journals = $collector->getPaginatedJournals();
|
$journals = $collector->getPaginatedJournals();
|
||||||
$journals->setPath('categories/show/' . $category->id);
|
$journals->setPath(route('categories.show', [$category->id]));
|
||||||
$count = $journals->getCollection()->count();
|
$count = $journals->getCollection()->count();
|
||||||
if ($count === 0 && $loop < 3) {
|
if ($count === 0 && $loop < 3) {
|
||||||
$start->subDay();
|
$start->subDay();
|
||||||
|
@@ -246,7 +246,7 @@ class TagController extends Controller
|
|||||||
$periods = new Collection;
|
$periods = new Collection;
|
||||||
$apiKey = env('GOOGLE_MAPS_API_KEY', '');
|
$apiKey = env('GOOGLE_MAPS_API_KEY', '');
|
||||||
$sum = '0';
|
$sum = '0';
|
||||||
$path = 'tags/show/' . $tag->id;
|
$path = route('tags.show', [$tag->id]);
|
||||||
|
|
||||||
|
|
||||||
// prep for "all" view.
|
// prep for "all" view.
|
||||||
@@ -255,7 +255,7 @@ class TagController extends Controller
|
|||||||
$start = $repository->firstUseDate($tag);
|
$start = $repository->firstUseDate($tag);
|
||||||
$end = new Carbon;
|
$end = new Carbon;
|
||||||
$sum = $repository->sumOfTag($tag);
|
$sum = $repository->sumOfTag($tag);
|
||||||
$path = 'tags/show/' . $tag->id . '/all';
|
$path = route('tags.show', [$tag->id,'all']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// prep for "specific date" view.
|
// prep for "specific date" view.
|
||||||
|
@@ -78,7 +78,7 @@ class TransactionController extends Controller
|
|||||||
$start = null;
|
$start = null;
|
||||||
$end = null;
|
$end = null;
|
||||||
$periods = new Collection;
|
$periods = new Collection;
|
||||||
$path = '/transactions/' . $what;
|
$path = route('transactions.index', [$what]);
|
||||||
|
|
||||||
// prep for "all" view.
|
// prep for "all" view.
|
||||||
if ($moment === 'all') {
|
if ($moment === 'all') {
|
||||||
@@ -86,14 +86,14 @@ class TransactionController extends Controller
|
|||||||
$first = $repository->first();
|
$first = $repository->first();
|
||||||
$start = $first->date ?? new Carbon;
|
$start = $first->date ?? new Carbon;
|
||||||
$end = new Carbon;
|
$end = new Carbon;
|
||||||
$path = '/transactions/' . $what . '/all/';
|
$path = route('transactions.index', [$what, 'all']);
|
||||||
}
|
}
|
||||||
|
|
||||||
// prep for "specific date" view.
|
// prep for "specific date" view.
|
||||||
if (strlen($moment) > 0 && $moment !== 'all') {
|
if (strlen($moment) > 0 && $moment !== 'all') {
|
||||||
$start = new Carbon($moment);
|
$start = new Carbon($moment);
|
||||||
$end = Navigation::endOfPeriod($start, $range);
|
$end = Navigation::endOfPeriod($start, $range);
|
||||||
$path = '/transactions/' . $what . '/' . $moment;
|
$path = route('transactions.index', [$what, $moment]);
|
||||||
$subTitle = trans(
|
$subTitle = trans(
|
||||||
'firefly.title_' . $what . '_between',
|
'firefly.title_' . $what . '_between',
|
||||||
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
|
['start' => $start->formatLocalized($this->monthAndDayFormat), 'end' => $end->formatLocalized($this->monthAndDayFormat)]
|
||||||
|
Reference in New Issue
Block a user