Fixing routes

This commit is contained in:
James Cole
2016-12-06 06:52:17 +01:00
parent 9cb3bfaa57
commit bebfbf0b90
25 changed files with 103 additions and 91 deletions

View File

@@ -77,3 +77,7 @@
</div>
{{ Form.close|raw }}
{% endblock %}
{% block scripts %}
<script type="text/javascript" src="js/ff/accounts/create-edit.js"></script>
{% endblock %}

View File

@@ -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 %}

View File

@@ -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>

View File

@@ -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 %}

View File

@@ -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>

View File

@@ -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() }}"/>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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">

View File

@@ -9,7 +9,7 @@
<tbody>
<tr>
<td>&nbsp;</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">&nbsp;</td>
</tr>
{% for category in categories %}

View File

@@ -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>

View File

@@ -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>