mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Many more route fixes.
This commit is contained in:
parent
f4887bbbf7
commit
628c7cd055
@ -51,13 +51,13 @@ class BalanceReportHelper implements BalanceReportHelperInterface
|
||||
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return Balance
|
||||
*/
|
||||
public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance
|
||||
public function getBalanceReport(Collection $accounts, Carbon $start, Carbon $end): Balance
|
||||
{
|
||||
$balance = new Balance;
|
||||
$header = new BalanceHeader;
|
||||
|
@ -26,11 +26,11 @@ use Illuminate\Support\Collection;
|
||||
interface BalanceReportHelperInterface
|
||||
{
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return Balance
|
||||
*/
|
||||
public function getBalanceReport(Carbon $start, Carbon $end, Collection $accounts): Balance;
|
||||
public function getBalanceReport(Collection $accounts, Carbon $start, Carbon $end): Balance;
|
||||
}
|
||||
|
@ -118,7 +118,7 @@ class ReportHelper implements ReportHelperInterface
|
||||
*
|
||||
* @return CategoryCollection
|
||||
*/
|
||||
public function getCategoryReport(Carbon $start, Carbon $end, Collection $accounts): CategoryCollection
|
||||
public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection
|
||||
{
|
||||
$object = new CategoryCollection;
|
||||
/** @var CategoryRepositoryInterface $repository */
|
||||
|
@ -49,7 +49,7 @@ interface ReportHelperInterface
|
||||
*
|
||||
* @return CategoryCollection
|
||||
*/
|
||||
public function getCategoryReport(Carbon $start, Carbon $end, Collection $accounts): CategoryCollection;
|
||||
public function getCategoryReport(Collection $accounts, Carbon $start, Carbon $end): CategoryCollection;
|
||||
|
||||
/**
|
||||
* @param Carbon $date
|
||||
|
@ -29,13 +29,13 @@ class AccountController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function accountReport(Carbon $start, Carbon $end, Collection $accounts)
|
||||
public function general(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
// chart properties for cache:
|
||||
$cache = new CacheProperties;
|
||||
@ -47,9 +47,9 @@ class AccountController extends Controller
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
|
||||
/** @var AccountTaskerInterface $accountTasker */
|
||||
$accountTasker = app(AccountTaskerInterface::class);
|
||||
$accountReport = $accountTasker->getAccountReport($start, $end, $accounts);
|
||||
$accountReport = $accountTasker->getAccountReport($accounts, $start, $end);
|
||||
|
||||
$result = view('reports.partials.accounts', compact('accountReport'))->render();
|
||||
$cache->store($result);
|
||||
|
@ -30,13 +30,13 @@ class BalanceController extends Controller
|
||||
|
||||
/**
|
||||
* @param BalanceReportHelperInterface $helper
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return string
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function balanceReport(BalanceReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts)
|
||||
public function general(BalanceReportHelperInterface $helper,Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
|
||||
|
||||
@ -50,7 +50,7 @@ class BalanceController extends Controller
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$balance = $helper->getBalanceReport($start, $end, $accounts);
|
||||
$balance = $helper->getBalanceReport($accounts, $start, $end);
|
||||
|
||||
$result = view('reports.partials.balance', compact('balance'))->render();
|
||||
$cache->store($result);
|
||||
|
@ -31,34 +31,6 @@ use Navigation;
|
||||
*/
|
||||
class CategoryController extends Controller
|
||||
{
|
||||
/**
|
||||
* @param ReportHelperInterface $helper
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
|
||||
*/
|
||||
public function categoryReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts)
|
||||
{
|
||||
// chart properties for cache:
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($start);
|
||||
$cache->addProperty($end);
|
||||
$cache->addProperty('category-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
$categories = $helper->getCategoryReport($start, $end, $accounts);
|
||||
|
||||
$result = view('reports.partials.categories', compact('categories'))->render();
|
||||
$cache->store($result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
@ -75,6 +47,7 @@ class CategoryController extends Controller
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
Log::debug('Return report from cache');
|
||||
|
||||
return $cache->get();
|
||||
}
|
||||
/** @var CategoryRepositoryInterface $repository */
|
||||
@ -84,7 +57,7 @@ class CategoryController extends Controller
|
||||
$data[0] = $repository->periodExpensesNoCategory($accounts, $start, $end);
|
||||
$report = $this->filterReport($data);
|
||||
$periods = Navigation::listOfPeriods($start, $end);
|
||||
$result = view('reports.partials.category-period', compact('report', 'periods'))->render();
|
||||
$result = view('reports.partials.category-period', compact('report', 'periods'))->render();
|
||||
|
||||
$cache->store($result);
|
||||
|
||||
@ -108,6 +81,7 @@ class CategoryController extends Controller
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
Log::debug('Return report from cache');
|
||||
|
||||
return $cache->get();
|
||||
}
|
||||
/** @var CategoryRepositoryInterface $repository */
|
||||
@ -117,13 +91,48 @@ class CategoryController extends Controller
|
||||
$data[0] = $repository->periodIncomeNoCategory($accounts, $start, $end);
|
||||
$report = $this->filterReport($data);
|
||||
$periods = Navigation::listOfPeriods($start, $end);
|
||||
$result = view('reports.partials.category-period', compact('report', 'periods'))->render();
|
||||
$result = view('reports.partials.category-period', compact('report', 'periods'))->render();
|
||||
|
||||
$cache->store($result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReportHelperInterface $helper
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
// chart properties for cache:
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($start);
|
||||
$cache->addProperty($end);
|
||||
$cache->addProperty('category-report');
|
||||
$cache->addProperty($accounts->pluck('id')->toArray());
|
||||
if ($cache->has()) {
|
||||
return $cache->get();
|
||||
}
|
||||
|
||||
/** @var CategoryRepositoryInterface $repository */
|
||||
$repository = app(CategoryRepositoryInterface::class);
|
||||
$categories = $repository->getCategories();
|
||||
$report = [];
|
||||
/** @var Category $category */
|
||||
foreach ($categories as $category) {
|
||||
$spent = $repository->spentInPeriod(new Collection([$category]), $accounts, $start, $end);
|
||||
$report[$category->id] = ['name' => $category->name, 'spent' => $spent];
|
||||
}
|
||||
|
||||
$result = view('reports.partials.categories', compact('report'))->render();
|
||||
$cache->store($result);
|
||||
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Filters empty results from category period report
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/**
|
||||
* InOutController.php
|
||||
* OperationsController.php
|
||||
* Copyright (C) 2016 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This software may be modified and distributed under the terms of the
|
||||
@ -24,21 +24,21 @@ use FireflyIII\Support\CacheProperties;
|
||||
use Illuminate\Support\Collection;
|
||||
|
||||
/**
|
||||
* Class InOutController
|
||||
* Class OperationsController
|
||||
*
|
||||
* @package FireflyIII\Http\Controllers\Report
|
||||
*/
|
||||
class InOutController extends Controller
|
||||
class OperationsController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function expenseReport(Carbon $start, Carbon $end, Collection $accounts)
|
||||
public function expenses(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
// chart properties for cache:
|
||||
$cache = new CacheProperties;
|
||||
@ -58,14 +58,13 @@ class InOutController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReportHelperInterface $helper
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @return mixed|string
|
||||
*/
|
||||
public function incExpReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts)
|
||||
public function operations(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
// chart properties for cache:
|
||||
$cache = new CacheProperties;
|
||||
@ -95,7 +94,7 @@ class InOutController extends Controller
|
||||
)
|
||||
);
|
||||
|
||||
$result = view('reports.partials.income-vs-expenses', compact('incomeSum', 'expensesSum'))->render();
|
||||
$result = view('reports.partials.operations', compact('incomeSum', 'expensesSum'))->render();
|
||||
$cache->store($result);
|
||||
|
||||
return $result;
|
||||
@ -103,14 +102,13 @@ class InOutController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param ReportHelperInterface $helper
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
* @return string
|
||||
*/
|
||||
public function incomeReport(ReportHelperInterface $helper, Carbon $start, Carbon $end, Collection $accounts)
|
||||
public function income(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
// chart properties for cache:
|
||||
$cache = new CacheProperties;
|
@ -62,7 +62,7 @@ class ConvertController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector|View
|
||||
*/
|
||||
public function convert(TransactionType $destinationType, TransactionJournal $journal)
|
||||
public function index(TransactionType $destinationType, TransactionJournal $journal)
|
||||
{
|
||||
if ($this->isOpeningBalance($journal)) {
|
||||
return $this->redirectToAccount($journal);
|
||||
@ -115,7 +115,7 @@ class ConvertController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector
|
||||
*/
|
||||
public function submit(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal)
|
||||
public function postIndex(Request $request, JournalRepositoryInterface $repository, TransactionType $destinationType, TransactionJournal $journal)
|
||||
{
|
||||
if ($this->isOpeningBalance($journal)) {
|
||||
return $this->redirectToAccount($journal);
|
||||
|
@ -179,7 +179,7 @@ class SingleController extends Controller
|
||||
$count = $journal->transactions()->count();
|
||||
|
||||
if ($count > 2) {
|
||||
return redirect(route('transactions.edit-split', [$journal->id]));
|
||||
return redirect(route('transactions.split.edit', [$journal->id]));
|
||||
}
|
||||
|
||||
$what = strtolower(TransactionJournal::transactionTypeStr($journal));
|
||||
@ -286,7 +286,7 @@ class SingleController extends Controller
|
||||
|
||||
if ($doSplit === true) {
|
||||
// redirect to edit screen:
|
||||
return redirect(route('transactions.edit-split', [$journal->id]));
|
||||
return redirect(route('transactions.split.edit', [$journal->id]));
|
||||
}
|
||||
|
||||
|
||||
|
@ -157,7 +157,7 @@ class SplitController extends Controller
|
||||
// set value so edit routine will not overwrite URL:
|
||||
Session::put('transactions.edit-split.fromUpdate', true);
|
||||
|
||||
return redirect(route('transactions.edit-split', [$journal->id]))->withInput(['return_to_edit' => 1]);
|
||||
return redirect(route('transactions.split.edit', [$journal->id]))->withInput(['return_to_edit' => 1]);
|
||||
}
|
||||
|
||||
// redirect to previous URL.
|
||||
|
@ -146,7 +146,7 @@ class TransactionController extends Controller
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function indexDate(Request $request, string $what, string $date)
|
||||
public function indexByDate(Request $request, string $what, string $date)
|
||||
{
|
||||
$carbon = new Carbon($date);
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
|
@ -106,13 +106,13 @@ class AccountTasker implements AccountTaskerInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return AccountCollection
|
||||
*/
|
||||
public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection
|
||||
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): AccountCollection
|
||||
{
|
||||
$startAmount = '0';
|
||||
$endAmount = '0';
|
||||
|
@ -50,12 +50,12 @@ interface AccountTaskerInterface
|
||||
public function amountOutInPeriod(Collection $accounts, Collection $excluded, Carbon $start, Carbon $end): string;
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return AccountCollection
|
||||
*/
|
||||
public function getAccountReport(Carbon $start, Carbon $end, Collection $accounts): AccountCollection;
|
||||
public function getAccountReport(Collection $accounts, Carbon $start, Carbon $end): AccountCollection;
|
||||
|
||||
}
|
||||
|
@ -5,7 +5,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('rules.rule-group.store') }}" accept-charset="UTF-8" class="form-horizontal" id="store">
|
||||
<form method="POST" action="{{ route('rule-groups.store') }}" accept-charset="UTF-8" class="form-horizontal" id="store">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="POST" action="{{ route('rules.rule-group.destroy',ruleGroup.id) }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
|
||||
<form method="POST" action="{{ route('rule-groups.destroy',ruleGroup.id) }}" accept-charset="UTF-8" class="form-horizontal" id="destroy">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-lg-offset-3 col-md-12 col-sm-12">
|
||||
|
@ -5,7 +5,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ Form.model(ruleGroup, {'class' : 'form-horizontal','id' : 'update','url' : route('rules.rule-group.update',ruleGroup.id) } ) }}
|
||||
{{ Form.model(ruleGroup, {'class' : 'form-horizontal','id' : 'update','url' : route('rule-groups.update',ruleGroup.id) } ) }}
|
||||
<input type="hidden" name="id" value="{{ ruleGroup.id }}"/>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-12 col-sm-6">
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
{% block content %}
|
||||
|
||||
<form method="POST" action="{{ route('rules.rule-group.execute', ruleGroup.id) }}" accept-charset="UTF-8" class="form-horizontal" id="execute-rule-group">
|
||||
<form method="POST" action="{{ route('rule-groups.execute', ruleGroup.id) }}" accept-charset="UTF-8" class="form-horizontal" id="execute-rule-group">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
|
||||
<div class="row">
|
||||
|
@ -5,7 +5,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
{{ Form.model(rule, {'class' : 'form-horizontal','id' : 'store','url' : route('rules.rule.update', rule.id)}) }}
|
||||
{{ Form.model(rule, {'class' : 'form-horizontal','id' : 'store','url' : route('rules.update', rule.id)}) }}
|
||||
<input type="hidden" name="rule_group_id" value="{{ rule.rule_group_id }}"/>
|
||||
<div class="row">
|
||||
<div class="col-lg-6 col-md-6 col-sm-12">
|
||||
|
@ -5,7 +5,7 @@
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('transactions.convert.post', [destinationType.type|lower, journal.id]) }}" accept-charset="UTF-8" class="form-horizontal" id="store"
|
||||
<form method="POST" action="{{ route('transactions.convert.index.post', [destinationType.type|lower, journal.id]) }}" accept-charset="UTF-8" class="form-horizontal" id="store"
|
||||
enctype="multipart/form-data">
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
<div class="row">
|
||||
|
@ -4,7 +4,7 @@
|
||||
{{ Breadcrumbs.renderIfExists(Route.getCurrentRoute.getName, journal) }}
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<form method="POST" action="{{ route('split.journal.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
|
||||
<form method="POST" action="{{ route('transactions.split.update',journal.id) }}" accept-charset="UTF-8" class="form-horizontal" id="update"
|
||||
enctype="multipart/form-data">
|
||||
|
||||
<input name="_token" type="hidden" value="{{ csrf_token() }}">
|
||||
|
@ -211,7 +211,7 @@
|
||||
|
||||
<div class="col-sm-8">
|
||||
<p class="form-control-static">
|
||||
<a href="{{ route('transactions.edit-split', journal.id) }}">{{ ('split_this_'~what)|_ }}</a>
|
||||
<a href="{{ route('transactions.split.edit', journal.id) }}">{{ ('split_this_'~what)|_ }}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
@ -217,7 +217,7 @@
|
||||
{% if journal.transactionType.type != "Withdrawal" %}
|
||||
<p>
|
||||
<i class="fa fa-exchange" aria-hidden="true"></i>
|
||||
<a href="{{ route('transactions.convert', ['withdrawal', journal.id]) }}">
|
||||
<a href="{{ route('transactions.convert.index', ['withdrawal', journal.id]) }}">
|
||||
{{ ('convert_'~journal.transactionType.type~'_to_withdrawal')|_ }}
|
||||
</a>
|
||||
</p>
|
||||
@ -225,7 +225,7 @@
|
||||
{% if journal.transactionType.type != "Deposit" %}
|
||||
<p>
|
||||
<i class="fa fa-exchange" aria-hidden="true"></i>
|
||||
<a href="{{ route('transactions.convert', ['deposit', journal.id]) }}">
|
||||
<a href="{{ route('transactions.convert.index', ['deposit', journal.id]) }}">
|
||||
{{ ('convert_'~journal.transactionType.type~'_to_deposit')|_ }}
|
||||
</a>
|
||||
</p>
|
||||
@ -234,7 +234,7 @@
|
||||
{% if journal.transactionType.type != "Transfer" %}
|
||||
<p>
|
||||
<i class="fa fa-exchange" aria-hidden="true"></i>
|
||||
<a href="{{ route('transactions.convert', ['transfer', journal.id]) }}">
|
||||
<a href="{{ route('transactions.convert.index', ['transfer', journal.id]) }}">
|
||||
{{ ('convert_'~journal.transactionType.type~'_to_transfer')|_ }}
|
||||
</a>
|
||||
</p>
|
||||
|
@ -308,7 +308,6 @@ Route::group(
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/piggy-bank'], function () {
|
||||
// continue here.
|
||||
Route::get('{piggyBank}', ['uses' => 'PiggyBankController@history']);
|
||||
}
|
||||
);
|
||||
@ -398,8 +397,8 @@ Route::group(
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'piggy-banks', 'as' => 'piggy-banks.'], function () {
|
||||
Route::get('', ['uses' => 'PiggyBankController@index', 'as' => 'index']);
|
||||
Route::get('add/{piggyBank}', ['uses' => 'PiggyBankController@add', 'as' => 'addMoney']);
|
||||
Route::get('remove/{piggyBank}', ['uses' => 'PiggyBankController@remove', 'as' => 'removeMoney']);
|
||||
Route::get('add/{piggyBank}', ['uses' => 'PiggyBankController@add', 'as' => 'add-money']);
|
||||
Route::get('remove/{piggyBank}', ['uses' => 'PiggyBankController@remove', 'as' => 'remove-money']);
|
||||
Route::get('add-money/{piggyBank}', ['uses' => 'PiggyBankController@addMobile', 'as' => 'add-money-mobile']);
|
||||
Route::get('remove-money/{piggyBank}', ['uses' => 'PiggyBankController@removeMobile', 'as' => 'remove-money-mobile']);
|
||||
Route::get('create', ['uses' => 'PiggyBankController@create', 'as' => 'create']);
|
||||
@ -442,7 +441,7 @@ Route::group(
|
||||
Route::get('change-password', ['uses' => 'ProfileController@changePassword', 'as' => 'change-password']);
|
||||
Route::get('delete-account', ['uses' => 'ProfileController@deleteAccount', 'as' => 'delete-account']);
|
||||
Route::post('delete-account', ['uses' => 'ProfileController@postDeleteAccount', 'as' => 'delete-account.post']);
|
||||
Route::post('change-password', ['uses' => 'ProfileController@postChangePassword', 'as' => 'change-password.store']);
|
||||
Route::post('change-password', ['uses' => 'ProfileController@postChangePassword', 'as' => 'change-password.post']);
|
||||
}
|
||||
);
|
||||
|
||||
@ -453,8 +452,6 @@ Route::group(
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'reports', 'as' => 'reports.'], function () {
|
||||
|
||||
Route::get('', ['uses' => 'ReportController@index', 'as' => 'index']);
|
||||
|
||||
|
||||
Route::get('options/{reportType}', ['uses' => 'ReportController@options', 'as' => 'options']);
|
||||
Route::get('default/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@defaultReport', 'as' => 'report.default']);
|
||||
Route::get('audit/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@auditReport', 'as' => 'report.audit']);
|
||||
@ -490,8 +487,6 @@ Route::group(
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/category', 'as' => 'report-data.category.'], function () {
|
||||
|
||||
|
||||
Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@operations', 'as' => 'operations']);
|
||||
Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@income', 'as' => 'income']);
|
||||
Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expenses']);
|
||||
@ -505,9 +500,7 @@ Route::group(
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/balance', 'as' => 'report-data.balance.'], function () {
|
||||
|
||||
Route::get(
|
||||
'general/{accountList}/{start_date}/{end_date}', ['uses' => 'BalanceController@general', 'as' => 'general']
|
||||
);
|
||||
Route::get('general/{accountList}/{start_date}/{end_date}', ['uses' => 'BalanceController@general', 'as' => 'general']);
|
||||
}
|
||||
);
|
||||
|
||||
@ -516,6 +509,7 @@ Route::group(
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/budget', 'as' => 'report-data.budget.'], function () {
|
||||
|
||||
Route::get('general/{accountList}/{start_date}/{end_date}/', ['uses' => 'BudgetController@general', 'as' => 'general']);
|
||||
Route::get('period/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period', 'as' => 'period']);
|
||||
|
||||
@ -529,18 +523,18 @@ Route::group(
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'rules', 'as' => 'rules.'], function () {
|
||||
|
||||
Route::get('', ['uses' => 'RuleController@index', 'as' => 'index']);
|
||||
Route::get('create/{ruleGroup}', ['uses' => 'RuleController@create', 'as' => 'rule.create']);
|
||||
Route::get('up/{rule}', ['uses' => 'RuleController@up', 'as' => 'rule.up']);
|
||||
Route::get('down/{rule}', ['uses' => 'RuleController@down', 'as' => 'rule.down']);
|
||||
Route::get('edit/{rule}', ['uses' => 'RuleController@edit', 'as' => 'rule.edit']);
|
||||
Route::get('delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'rule.delete']);
|
||||
Route::get('test', ['uses' => 'RuleController@testTriggers', 'as' => 'rule.test-triggers']);
|
||||
Route::get('create/{ruleGroup}', ['uses' => 'RuleController@create', 'as' => 'create']);
|
||||
Route::get('up/{rule}', ['uses' => 'RuleController@up', 'as' => 'up']);
|
||||
Route::get('down/{rule}', ['uses' => 'RuleController@down', 'as' => 'down']);
|
||||
Route::get('edit/{rule}', ['uses' => 'RuleController@edit', 'as' => 'edit']);
|
||||
Route::get('delete/{rule}', ['uses' => 'RuleController@delete', 'as' => 'delete']);
|
||||
Route::get('test', ['uses' => 'RuleController@testTriggers', 'as' => 'test-triggers']);
|
||||
|
||||
Route::post('trigger/order/{rule}', ['uses' => 'RuleController@reorderRuleTriggers']);
|
||||
Route::post('action/order/{rule}', ['uses' => 'RuleController@reorderRuleActions']);
|
||||
Route::post('store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'rule.store']);
|
||||
Route::post('update/{rule}', ['uses' => 'RuleController@update', 'as' => 'rule.update']);
|
||||
Route::post('destroy/{rule}', ['uses' => 'RuleController@destroy', 'as' => 'rule.destroy']);
|
||||
Route::post('trigger/order/{rule}', ['uses' => 'RuleController@reorderRuleTriggers','as' => 'reorder-triggers']);
|
||||
Route::post('action/order/{rule}', ['uses' => 'RuleController@reorderRuleActions', 'as' => 'reorder-actions']);
|
||||
Route::post('store/{ruleGroup}', ['uses' => 'RuleController@store', 'as' => 'store']);
|
||||
Route::post('update/{rule}', ['uses' => 'RuleController@update', 'as' => 'update']);
|
||||
Route::post('destroy/{rule}', ['uses' => 'RuleController@destroy', 'as' => 'destroy']);
|
||||
|
||||
}
|
||||
);
|
||||
@ -576,7 +570,7 @@ Route::group(
|
||||
|
||||
|
||||
/**
|
||||
* Name Controller
|
||||
* Tag Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'tags', 'as' => 'tags.'], function () {
|
||||
@ -600,7 +594,7 @@ Route::group(
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'transactions', 'as' => 'transactions.'], function () {
|
||||
Route::get('{what}', ['uses' => 'TransactionController@index', 'as' => 'index'])->where(['what' => 'withdrawal|deposit|transfers']);
|
||||
Route::get('{what}/all', ['uses' => 'TransactionController@indexAll', 'as' => 'index.all'])->where(['what' => 'withdrawal|deposit|transfers']);
|
||||
Route::get('{what}/{date}', ['uses' => 'TransactionController@indexDate', 'as' => 'index.date'])->where(['what' => 'withdrawal|deposit|transfers']);
|
||||
Route::get('{what}/{date}', ['uses' => 'TransactionController@indexByDate', 'as' => 'index.date'])->where(['what' => 'withdrawal|deposit|transfers']);
|
||||
Route::get('show/{tj}', ['uses' => 'TransactionController@show', 'as' => 'show']);
|
||||
Route::post('reorder', ['uses' => 'TransactionController@reorder', 'as' => 'reorder']);
|
||||
}
|
||||
@ -644,7 +638,7 @@ Route::group(
|
||||
);
|
||||
|
||||
/**
|
||||
* Name Controller
|
||||
* Convert Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Transaction', 'prefix' => 'transactions/convert', 'as' => 'transactions.convert.'], function () {
|
||||
@ -655,7 +649,7 @@ Route::group(
|
||||
);
|
||||
|
||||
/**
|
||||
* Name Controller
|
||||
* Report Popup Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Popup', 'prefix' => 'popup', 'as' => 'popup.'], function () {
|
||||
|
Loading…
Reference in New Issue
Block a user