mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixing routes
This commit is contained in:
parent
9cb3bfaa57
commit
bebfbf0b90
@ -282,7 +282,7 @@ class AccountController extends Controller
|
||||
*
|
||||
* @return View
|
||||
*/
|
||||
public function showWithDate(Account $account, string $date)
|
||||
public function showByDate(Account $account, string $date)
|
||||
{
|
||||
$carbon = new Carbon($date);
|
||||
$range = Preferences::get('viewRange', '1M')->data;
|
||||
@ -298,7 +298,7 @@ class AccountController extends Controller
|
||||
$journals = $collector->getPaginatedJournals();
|
||||
$journals->setPath('accounts/show/' . $account->id . '/' . $date);
|
||||
|
||||
return view('accounts.show_with_date', compact('category', 'date', 'account', 'journals', 'subTitle', 'carbon', 'start', 'end'));
|
||||
return view('accounts.show-by-date', compact('category', 'date', 'account', 'journals', 'subTitle', 'carbon', 'start', 'end'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,10 +38,16 @@ class TwoFactorController extends Controller
|
||||
$user = auth()->user();
|
||||
|
||||
// to make sure the validator in the next step gets the secret, we push it in session
|
||||
$secret = Preferences::get('twoFactorAuthSecret', '')->data;
|
||||
$secret = Preferences::get('twoFactorAuthSecret', null)->data;
|
||||
$title = strval(trans('firefly.two_factor_title'));
|
||||
|
||||
if (strlen($secret) === 0) {
|
||||
// make sure the user has two factor configured:
|
||||
$has2FA = Preferences::get('twoFactorAuthEnabled', null)->data;
|
||||
if (is_null($has2FA) || $has2FA === false) {
|
||||
return redirect(route('index'));
|
||||
}
|
||||
|
||||
if (strlen(strval($secret)) === 0) {
|
||||
throw new FireflyException('Your two factor authentication secret is empty, which it cannot be at this point. Please check the log files.');
|
||||
}
|
||||
Session::flash('two-factor-secret', $secret);
|
||||
|
@ -112,7 +112,7 @@ class AccountController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function expenseByBudget(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end)
|
||||
public function expenseBudget(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end)
|
||||
{
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($account->id);
|
||||
@ -153,7 +153,7 @@ class AccountController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function expenseByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end)
|
||||
public function expenseCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end)
|
||||
{
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($account->id);
|
||||
@ -199,7 +199,7 @@ class AccountController extends Controller
|
||||
$frontPage = Preferences::get('frontPageAccounts', $repository->getAccountsByType([AccountType::DEFAULT, AccountType::ASSET])->pluck('id')->toArray());
|
||||
$accounts = $repository->getAccountsById($frontPage->data);
|
||||
|
||||
return Response::json($this->accountBalanceChart($start, $end, $accounts));
|
||||
return Response::json($this->accountBalanceChart($accounts, $start, $end));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -210,7 +210,7 @@ class AccountController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function incomeByCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end)
|
||||
public function incomeCategory(JournalCollectorInterface $collector, Account $account, Carbon $start, Carbon $end)
|
||||
{
|
||||
$cache = new CacheProperties;
|
||||
$cache->addProperty($account->id);
|
||||
@ -251,9 +251,9 @@ class AccountController extends Controller
|
||||
*
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function report(Carbon $start, Carbon $end, Collection $accounts)
|
||||
public function report(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
return Response::json($this->accountBalanceChart($start, $end, $accounts));
|
||||
return Response::json($this->accountBalanceChart($accounts, $start, $end));
|
||||
}
|
||||
|
||||
/**
|
||||
@ -406,13 +406,13 @@ class AccountController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
private function accountBalanceChart(Carbon $start, Carbon $end, Collection $accounts): array
|
||||
private function accountBalanceChart(Collection $accounts, Carbon $start, Carbon $end): array
|
||||
{
|
||||
// chart properties for cache:
|
||||
$cache = new CacheProperties();
|
||||
|
@ -61,14 +61,13 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function auditReport(Carbon $start, Carbon $end, Collection $accounts)
|
||||
public function auditReport(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', trans('firefly.end_after_start_date'));
|
||||
@ -97,15 +96,14 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Collection $categories
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @param Collection $categories
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function categoryReport(Carbon $start, Carbon $end, Collection $accounts, Collection $categories)
|
||||
public function categoryReport(Collection $accounts, Collection $categories, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', trans('firefly.end_after_start_date'));
|
||||
@ -134,14 +132,13 @@ class ReportController extends Controller
|
||||
}
|
||||
|
||||
/**
|
||||
* @param Collection $accounts
|
||||
* @param Carbon $start
|
||||
* @param Carbon $end
|
||||
* @param Collection $accounts
|
||||
*
|
||||
* @return string
|
||||
* @throws FireflyException
|
||||
*/
|
||||
public function defaultReport(Carbon $start, Carbon $end, Collection $accounts)
|
||||
public function defaultReport(Collection $accounts, Carbon $start, Carbon $end)
|
||||
{
|
||||
if ($end < $start) {
|
||||
return view('error')->with('message', trans('firefly.end_after_start_date'));
|
||||
@ -246,13 +243,13 @@ class ReportController extends Controller
|
||||
default:
|
||||
throw new FireflyException(sprintf('Firefly does not support the "%s"-report yet.', $reportType));
|
||||
case 'category':
|
||||
$uri = route('reports.report.category', [$start, $end, $accounts, $categories]);
|
||||
$uri = route('reports.report.category', [$accounts, $categories, $start, $end]);
|
||||
break;
|
||||
case 'default':
|
||||
$uri = route('reports.report.default', [$start, $end, $accounts]);
|
||||
$uri = route('reports.report.default', [$accounts, $start, $end]);
|
||||
break;
|
||||
case 'audit':
|
||||
$uri = route('reports.report.audit', [$start, $end, $accounts]);
|
||||
$uri = route('reports.report.audit', [$accounts, $start, $end]);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -57,7 +57,7 @@ class AuthenticateTwoFactor
|
||||
$has2faSecret = !is_null(Preferences::get('twoFactorAuthSecret'));
|
||||
$is2faAuthed = Session::get('twofactor-authenticated');
|
||||
if ($is2faEnabled && $has2faSecret && !$is2faAuthed) {
|
||||
return redirect(route('two-factor'));
|
||||
return redirect(route('two-factor.index'));
|
||||
}
|
||||
|
||||
return $next($request);
|
||||
|
@ -6,9 +6,6 @@
|
||||
* of the MIT license. See the LICENSE file for details.
|
||||
*/
|
||||
|
||||
/* global $, lineChart, dateString, accountID, token, incomeByCategoryUri, expenseByCategoryUri, expenseByBudgetUri */
|
||||
|
||||
|
||||
// Return a helper with preserved width of cells
|
||||
var fixHelper = function (e, tr) {
|
||||
"use strict";
|
||||
@ -24,11 +21,11 @@ var fixHelper = function (e, tr) {
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
lineChart('chart/account/' + accountID + '/' + dateString, 'period-specific-account');
|
||||
lineChart(periodUri, 'period-specific-account');
|
||||
|
||||
pieChart(incomeByCategoryUri, 'account-cat-in');
|
||||
pieChart(expenseByCategoryUri, 'account-cat-out');
|
||||
pieChart(expenseByBudgetUri, 'account-budget-out');
|
||||
pieChart(incomeCategoryUri, 'account-cat-in');
|
||||
pieChart(expenseCategoryUri, 'account-cat-out');
|
||||
pieChart(expenseBudgetUri, 'account-budget-out');
|
||||
|
||||
|
||||
// sortable!
|
@ -15,10 +15,10 @@ var fixHelper = function (e, tr) {
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
lineChart('chart/account/' + accountID, 'overview-chart');
|
||||
pieChart(incomeByCategoryUri, 'account-cat-in');
|
||||
pieChart(expenseByCategoryUri, 'account-cat-out');
|
||||
pieChart(expenseByBudgetUri, 'account-budget-out');
|
||||
lineChart(singleUri, 'overview-chart');
|
||||
pieChart(incomeCategoryUri, 'account-cat-in');
|
||||
pieChart(expenseCategoryUri, 'account-cat-out');
|
||||
pieChart(expenseBudgetUri, 'account-budget-out');
|
||||
|
||||
|
||||
// sortable!
|
||||
|
@ -2,8 +2,6 @@
|
||||
|
||||
$(function () {
|
||||
"use strict";
|
||||
if (typeof(columnChart) === 'function' && typeof(billID) !== 'undefined') {
|
||||
columnChart('chart/bill/' + billID, 'bill-overview');
|
||||
}
|
||||
columnChart(billUri, 'bill-overview');
|
||||
}
|
||||
);
|
@ -32,14 +32,14 @@ function endTheTour() {
|
||||
|
||||
function drawChart() {
|
||||
"use strict";
|
||||
lineChart('chart/account/frontpage', 'accounts-chart');
|
||||
lineChart(accountFrontpageUri, 'accounts-chart');
|
||||
if (billCount > 0) {
|
||||
pieChart('chart/bill/frontpage', 'bills-chart');
|
||||
}
|
||||
stackedColumnChart('chart/budget/frontpage', 'budgets-chart');
|
||||
columnChart('chart/category/frontpage', 'categories-chart');
|
||||
columnChart('chart/account/expense', 'expense-accounts-chart');
|
||||
columnChart('chart/account/revenue', 'revenue-accounts-chart');
|
||||
columnChart(accountExpenseUri, 'expense-accounts-chart');
|
||||
columnChart(accountRevenueUri, 'revenue-accounts-chart');
|
||||
|
||||
|
||||
getBoxAmounts();
|
||||
|
@ -98,7 +98,7 @@ function displayAjaxPartial(data, holder) {
|
||||
|
||||
function failAjaxPartial(uri, holder) {
|
||||
"use strict";
|
||||
console.log('Failed to load' + uri);
|
||||
console.log('Failed to load: ' + uri);
|
||||
$('#' + holder).removeClass('loading').addClass('general-chart-error');
|
||||
|
||||
}
|
||||
|
@ -15,5 +15,5 @@ function drawChart() {
|
||||
|
||||
// month view:
|
||||
// draw account chart
|
||||
lineChart('chart/account/report/' + reportType + '/' + startDate + '/' + endDate + '/' + accountIds, 'account-balances-chart');
|
||||
lineChart(accountChartUri, 'account-balances-chart');
|
||||
}
|
@ -77,3 +77,7 @@
|
||||
</div>
|
||||
{{ Form.close|raw }}
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
<script type="text/javascript" src="js/ff/accounts/create-edit.js"></script>
|
||||
{% endblock %}
|
@ -94,9 +94,10 @@
|
||||
var dateString = "{{ date|escape }}";
|
||||
|
||||
// uri's for charts:
|
||||
var incomeByCategoryUri = '{{ route('chart.account.incomeByCategory', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var expenseByCategoryUri = '{{ route('chart.account.expenseByCategory', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var expenseByBudgetUri = '{{ route('chart.account.expenseByBudget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var periodUri = '{{ route('chart.account.single', [account.id, date]) }}';
|
||||
var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="js/lib/Chart.bundle.min.js"></script>
|
||||
@ -104,6 +105,6 @@
|
||||
<script type="text/javascript" src="js/ff/charts.js"></script>
|
||||
<script src="js/lib/jquery-ui.min.js" type="text/javascript"></script>
|
||||
<script src="js/lib/jquery.color-2.1.2.min.js" type="text/javascript"></script>
|
||||
<script src="js/ff/accounts/show_with_date.js" type="text/javascript"></script>
|
||||
<script src="js/ff/accounts/show-by-date.js" type="text/javascript"></script>
|
||||
<script type="text/javascript" src="js/ff/transactions/list.js"></script>
|
||||
{% endblock %}
|
||||
|
@ -123,9 +123,10 @@
|
||||
<script type="text/javascript">
|
||||
var accountID = {{ account.id }};
|
||||
// uri's for charts:
|
||||
var incomeByCategoryUri = '{{ route('chart.account.incomeByCategory', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var expenseByCategoryUri = '{{ route('chart.account.expenseByCategory', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var expenseByBudgetUri = '{{ route('chart.account.expenseByBudget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var singleUri = '{{ route('chart.account.single', [account.id]) }}';
|
||||
var incomeCategoryUri = '{{ route('chart.account.income-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var expenseCategoryUri = '{{ route('chart.account.expense-category', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -18,7 +18,7 @@
|
||||
<p class="login-box-msg">{{ trans('firefly.two_factor_welcome', {user: user.email}) }}</p>
|
||||
<p class="login-box-msg">{{ 'two_factor_enter_code'|_ }}</p>
|
||||
|
||||
<form action="{{ route('two-factor-post') }}" method="post">
|
||||
<form action="{{ route('two-factor.post') }}" method="post">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
<div class="form-group has-feedback">
|
||||
@ -33,7 +33,7 @@
|
||||
<!-- /.col -->
|
||||
</div>
|
||||
</form>
|
||||
<a href="{{ route('lost-two-factor') }}">{{ 'two_factor_forgot'|_ }}</a>
|
||||
<a href="{{ route('two-factor.lost') }}">{{ 'two_factor_forgot'|_ }}</a>
|
||||
</div>
|
||||
<!-- /.login-box-body -->
|
||||
{% endblock %}
|
||||
|
@ -116,7 +116,7 @@
|
||||
|
||||
{% block scripts %}
|
||||
<script type="text/javascript">
|
||||
var billID = {{ bill.id }};
|
||||
var billUri = '{{ route('chart.bill.single', [bill.id]) }}';
|
||||
</script>
|
||||
<script type="text/javascript" src="js/lib/Chart.bundle.min.js"></script>
|
||||
<script type="text/javascript" src="js/ff/charts.defaults.js"></script>
|
||||
|
@ -8,7 +8,7 @@
|
||||
</h4>
|
||||
</div>
|
||||
|
||||
<form style="display: inline;" id="income" action="{{ route('budgets.postIncome') }}" method="POST">
|
||||
<form style="display: inline;" id="income" action="{{ route('budgets.income.post') }}" method="POST">
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token() }}"/>
|
||||
|
||||
|
@ -65,7 +65,7 @@
|
||||
</div>
|
||||
<div class="box-body">
|
||||
<p>
|
||||
<a href="{{ route('budgets.noBudget') }}">
|
||||
<a href="{{ route('budgets.no-budget') }}">
|
||||
{{ trans('firefly.transactions_no_budget', {start: periodStart, end: periodEnd }) }}
|
||||
</a>
|
||||
</p>
|
||||
@ -91,7 +91,7 @@
|
||||
<h3 class="box-title">
|
||||
<!-- link in header -->
|
||||
{% if budget.currentRep.id %}
|
||||
<a href="{{ route('budgets.showWithRepetition', [budget.id, budget.currentRep.id]) }}" class="budget-link"
|
||||
<a href="{{ route('budgets.show.repetition', [budget.id, budget.currentRep.id]) }}" class="budget-link"
|
||||
data-id="{{ budget.id }}">{{ budget.name }}</a>
|
||||
{% else %}
|
||||
<a href="{{ route('budgets.show',budget.id) }}" class="budget-link" data-id="{{ budget.id }}">{{ budget.name }}</a>
|
||||
|
@ -143,6 +143,11 @@
|
||||
showTour = false;
|
||||
{% endif %}
|
||||
var billCount = {{ billCount }};
|
||||
|
||||
// uri's of charts:
|
||||
var accountFrontpageUri = '{{ route('chart.account.frontpage') }}';
|
||||
var accountRevenueUri = '{{ route('chart.account.revenue') }}';
|
||||
var accountExpenseUri = '{{ route('chart.account.expense') }}';
|
||||
</script>
|
||||
|
||||
<script type="text/javascript" src="js/lib/Chart.bundle.min.js"></script>
|
||||
|
@ -91,7 +91,7 @@
|
||||
<!-- sidebar: style can be found in sidebar.less -->
|
||||
<section class="sidebar">
|
||||
<!-- search form -->
|
||||
<form action="{{ route('search') }}" method="get" class="sidebar-form">
|
||||
<form action="{{ route('search.index') }}" method="get" class="sidebar-form">
|
||||
<div class="input-group">
|
||||
<input type="text" name="q" class="form-control" placeholder="{{ 'searchPlaceholder'|_ }}" value="{{ query }}"/>
|
||||
<span class="input-group-btn">
|
||||
|
@ -9,7 +9,7 @@
|
||||
<tbody>
|
||||
<tr>
|
||||
<td> </td>
|
||||
<td><a href="{{ route('categories.noCategory') }}"><em>{{ 'without_category'|_ }}</em></a></td>
|
||||
<td><a href="{{ route('categories.no-category') }}"><em>{{ 'without_category'|_ }}</em></a></td>
|
||||
<td class="hidden-sm hidden-xs"> </td>
|
||||
</tr>
|
||||
{% for category in categories %}
|
||||
|
@ -132,14 +132,17 @@
|
||||
var reportType = '{{ reportType }}';
|
||||
var accountIds = '{{ accountIds }}';
|
||||
|
||||
<!-- some URL's -->
|
||||
var accountReportUri = '{{ route('reports.data.accountReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var incomeReportUri = '{{ route('reports.data.incomeReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var expenseReportUri = '{{ route('reports.data.expenseReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var incExpReportUri = '{{ route('reports.data.incExpReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var categoryReportUri = '{{ route('reports.data.categoryReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var budgetReportUri = '{{ route('reports.data.budgetReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var balanceReportUri = '{{ route('reports.data.balanceReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
// uri's for data
|
||||
var categoryReportUri = '{{ route('report-data.category.operations', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var budgetReportUri = '{{ route('report-data.budget.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var balanceReportUri = '{{ route('report-data.balance.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var accountReportUri = '{{ route('report-data.account.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var incomeReportUri = '{{ route('report-data.operations.income', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var expenseReportUri = '{{ route('report-data.operations.expenses', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var incExpReportUri = '{{ route('report-data.operations.operations', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
|
||||
// uri's for charts:
|
||||
var accountChartUri = '{{ route('chart.account.report', [accountIds, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="js/ff/reports/default/all.js"></script>
|
||||
|
@ -170,15 +170,14 @@
|
||||
var reportType = '{{ reportType }}';
|
||||
var accountIds = '{{ accountIds }}';
|
||||
|
||||
<!-- some URL's -->
|
||||
var accountReportUri = '{{ route('reports.data.accountReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var incomeReportUri = '{{ route('reports.data.incomeReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var expenseReportUri = '{{ route('reports.data.expenseReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var incExpReportUri = '{{ route('reports.data.incExpReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var accountReportUri = '{{ route('report-data.account.general', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var incomeReportUri = '{{ route('report-data.operations.income', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var expenseReportUri = '{{ route('report-data.operations.expenses', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var incExpReportUri = '{{ route('report-data.operations.operations', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
|
||||
var budgetPeriodReportUri = '{{ route('reports.data.budgetPeriodReport', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var categoryExpenseUri = '{{ route('reports.data.categoryExpense', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var categoryIncomeUri = '{{ route('reports.data.categoryIncome', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var budgetPeriodReportUri = '{{ route('report-data.budget.period', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var categoryExpenseUri = '{{ route('report-data.category.expenses', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
var categoryIncomeUri = '{{ route('report-data.category.income', [start.format('Ymd'), end.format('Ymd'), accountIds]) }}';
|
||||
|
||||
</script>
|
||||
|
||||
|
@ -156,7 +156,7 @@ Route::group(
|
||||
Route::get('delete/{budget}', ['uses' => 'BudgetController@delete', 'as' => 'delete']);
|
||||
Route::get('show/{budget}', ['uses' => 'BudgetController@show', 'as' => 'show']);
|
||||
Route::get('show/{budget}/{limitrepetition}', ['uses' => 'BudgetController@showByRepetition', 'as' => 'show.repetition']);
|
||||
Route::get('list/noBudget', ['uses' => 'BudgetController@noBudget', 'as' => 'no-budget']);
|
||||
Route::get('list/no-budget', ['uses' => 'BudgetController@noBudget', 'as' => 'no-budget']);
|
||||
|
||||
Route::post('income', ['uses' => 'BudgetController@postUpdateIncome', 'as' => 'income.post']);
|
||||
Route::post('store', ['uses' => 'BudgetController@store', 'as' => 'store']);
|
||||
@ -178,7 +178,7 @@ Route::group(
|
||||
|
||||
Route::get('show/{category}', ['uses' => 'CategoryController@show', 'as' => 'show']);
|
||||
Route::get('show/{category}/{date}', ['uses' => 'CategoryController@showByDate', 'as' => 'show.date']);
|
||||
Route::get('list/noCategory', ['uses' => 'CategoryController@noCategory', 'as' => 'no-category']);
|
||||
Route::get('list/no-category', ['uses' => 'CategoryController@noCategory', 'as' => 'no-category']);
|
||||
|
||||
Route::post('store', ['uses' => 'CategoryController@store', 'as' => 'store']);
|
||||
Route::post('update/{category}', ['uses' => 'CategoryController@update', 'as' => 'update']);
|
||||
@ -227,7 +227,7 @@ Route::group(
|
||||
Route::get('frontpage', ['uses' => 'AccountController@frontpage', 'as' => 'frontpage']);
|
||||
Route::get('expense', ['uses' => 'AccountController@expenseAccounts', 'as' => 'expense']);
|
||||
Route::get('revenue', ['uses' => 'AccountController@revenueAccounts', 'as' => 'revenue']);
|
||||
Route::get('report/default/{accountList}/{start_date}/{end_date}', ['uses' => 'AccountController@report', 'as' => 'report']);
|
||||
Route::get('report/{accountList}/{start_date}/{end_date}', ['uses' => 'AccountController@report', 'as' => 'report']);
|
||||
Route::get('single/{account}', ['uses' => 'AccountController@single', 'as' => 'single']);
|
||||
Route::get('period/{account}/{date}', ['uses' => 'AccountController@period', 'as' => 'period']);
|
||||
|
||||
@ -242,9 +242,9 @@ Route::group(
|
||||
* Chart\Bill Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/bill'], function () {
|
||||
Route::get('frontpage', ['uses' => 'BillController@frontpage']);
|
||||
Route::get('single/{bill}', ['uses' => 'BillController@single']);
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/bill','as' => 'chart.bill.'], function () {
|
||||
Route::get('frontpage', ['uses' => 'BillController@frontpage' ,'as' => 'frontpage']);
|
||||
Route::get('single/{bill}', ['uses' => 'BillController@single','as' => 'single']);
|
||||
|
||||
}
|
||||
);
|
||||
@ -254,6 +254,7 @@ Route::group(
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Chart', 'prefix' => 'chart/budget'], function () {
|
||||
|
||||
Route::get('frontpage', ['uses' => 'BudgetController@frontpage']);
|
||||
Route::get('period/0/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@periodNoBudget']);
|
||||
Route::get('period/{budget}/{accountList}/{start_date}/{end_date}', ['uses' => 'BudgetController@period']);
|
||||
@ -399,7 +400,7 @@ Route::group(
|
||||
|
||||
|
||||
/**
|
||||
* Name Controller
|
||||
* Preferences Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'preferences', 'as' => 'preferences.'], function () {
|
||||
@ -427,7 +428,7 @@ Route::group(
|
||||
);
|
||||
|
||||
/**
|
||||
* Name Controller
|
||||
* Report Controller
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'prefix' => 'reports', 'as' => 'reports.'], function () {
|
||||
@ -436,9 +437,9 @@ Route::group(
|
||||
|
||||
|
||||
Route::get('options/{reportType}', ['uses' => 'ReportController@options', 'as' => 'options']);
|
||||
Route::get('default/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@default', 'as' => 'report.default']);
|
||||
Route::get('audit/{accountList}/{start_date}/{end_date}', ['uses' => 'ReportController@audit', 'as' => 'report.audit']);
|
||||
Route::get('category/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'ReportController@category', 'as' => 'report.category']);
|
||||
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']);
|
||||
Route::get('category/{accountList}/{categoryList}/{start_date}/{end_date}', ['uses' => 'ReportController@categoryReport', 'as' => 'report.category']);
|
||||
|
||||
Route::post('', ['uses' => 'ReportController@postIndex', 'as' => 'index.post']);
|
||||
}
|
||||
@ -448,7 +449,7 @@ Route::group(
|
||||
* Report Data AccountController
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/account', 'as' => 'report-data.account'], function () {
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/account', 'as' => 'report-data.account.'], function () {
|
||||
Route::get('general/{accountList}/{start_date}/{end_date}', ['uses' => 'AccountController@general', 'as' => 'general']);
|
||||
}
|
||||
);
|
||||
@ -457,7 +458,7 @@ Route::group(
|
||||
* Report Data Income/Expenses Controller (called financial operations)
|
||||
*/
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/operations', 'as' => 'report-data.operations'], function () {
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Report', 'prefix' => 'report-data/operations', 'as' => 'report-data.operations.'], function () {
|
||||
Route::get('operations/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@operations', 'as' => 'operations']);
|
||||
Route::get('income/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@income', 'as' => 'income']);
|
||||
Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'OperationsController@expenses', 'as' => 'expenses']);
|
||||
@ -472,7 +473,7 @@ 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' => 'expense']);
|
||||
Route::get('expenses/{accountList}/{start_date}/{end_date}', ['uses' => 'CategoryController@expenses', 'as' => 'expenses']);
|
||||
|
||||
}
|
||||
);
|
||||
@ -627,7 +628,7 @@ Route::group(
|
||||
Route::group(
|
||||
['middleware' => 'user-full-auth', 'namespace' => 'Transaction', 'prefix' => 'transactions/convert', 'as' => 'transactions.convert.'], function () {
|
||||
Route::get('{transaction_type}/{tj}', ['uses' => 'ConvertController@index', 'as' => 'index']);
|
||||
Route::post('{transaction_type}/{tj}', ['uses' => 'ConvertController@indexPost', 'as' => 'index.post']);
|
||||
Route::post('{transaction_type}/{tj}', ['uses' => 'ConvertController@postIndex', 'as' => 'index.post']);
|
||||
|
||||
}
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user