Fix some last-minute issues.

This commit is contained in:
James Cole
2019-09-04 10:27:13 +02:00
parent 2cda6eba94
commit 0f2040f931
10 changed files with 20 additions and 20 deletions

View File

@@ -196,7 +196,7 @@ class AvailableBudgetController extends Controller
}
session()->flash('success', trans('firefly.set_ab'));
return redirect(route('budgets.index'));
return redirect(route('budgets.index', [$start->format('Y-m-d'), $end->format('Y-m-d')]));
}
/**

View File

@@ -86,6 +86,7 @@ class IndexController extends Controller
}
/**
* TODO the "budgeted" progress bar doesn't update.
* Show all budgets.
*
* @param Request $request
@@ -194,9 +195,6 @@ class IndexController extends Controller
return view(
'budgets.index', compact(
'availableBudgets',
//'available',
//'currentMonth', 'next', 'nextText', 'prev',
//'prevText', 'previousLoop', 'nextLoop',
'budgeted', 'spent',
'prevLoop', 'nextLoop',
'budgets',

View File

@@ -155,7 +155,7 @@ class ReportFormRequest extends Request
{
/** @var AccountRepositoryInterface $repository */
$repository = app(AccountRepositoryInterface::class);
$set = $this->get('exp_rev');
$set = $this->get('double');
$collection = new Collection;
if (is_array($set)) {
foreach ($set as $accountId) {

View File

@@ -359,6 +359,7 @@ class TagRepository implements TagRepositoryInterface
'size' => $fontSize,
'tag' => $tag->tag,
'id' => $tag->id,
'created_at' => $tag->created_at,
];
}
@@ -481,7 +482,7 @@ class TagRepository implements TagRepositoryInterface
$tagQuery->where('tags.date', '>=', $year . '-01-01 00:00:00')->where('tags.date', '<=', $year . '-12-31 23:59:59');
}
return $tagQuery->get(['tags.id', 'tags.tag', DB::raw('SUM(transactions.amount) as amount_sum')]);
return $tagQuery->get(['tags.id', 'tags.tag','tags.created_at', DB::raw('SUM(transactions.amount) as amount_sum')]);
}
}

View File

@@ -25,12 +25,12 @@
</div>
<div class="col-lg-8 col-md-4 col-sm-12 col-xs-12 text-center">
<div class="btn btn-group btn-group-lg" style="padding-top:0;">
<a href="{{ route('budgets.index', [prevLoop[0].start.format('Y-m-d'), prevLoop[0].end.format('Y-m-d')]) }}?page={{ page }}"
<a href="{{ route('budgets.index', [prevLoop[0].start.format('Y-m-d'), prevLoop[0].end.format('Y-m-d')]) }}"
class="btn btn-default" title="{{ prevLoop[0].title }}">&larr;</a>
<a title="{{ start.formatLocalized(monthAndDayFormat) }} - {{ end.formatLocalized(monthAndDayFormat) }}"
href="{{ route('budgets.index', [start.format('Y-m-d'), end.format('Y-m-d')]) }}?page={{ page }}"
href="{{ route('budgets.index', [start.format('Y-m-d'), end.format('Y-m-d')]) }}"
class="btn btn-default">{{ periodTitle }}</a>
<a href="{{ route('budgets.index', [nextLoop[0].start.format('Y-m-d'), nextLoop[0].end.format('Y-m-d')]) }}?page={{ page }}"
<a href="{{ route('budgets.index', [nextLoop[0].start.format('Y-m-d'), nextLoop[0].end.format('Y-m-d')]) }}"
class="btn btn-default" title="{{ nextLoop[0].title }}">&rarr;</a>
</div>
</div>
@@ -420,7 +420,7 @@
var updateBudgetLimitUri = "{{ route('budget-limits.update', ['REPLACEME']) }}";
{#var budgetAmountUri = "{{ route('budgets.amount','REPLACE') }}";#}
{#var updateIncomeUri = "{{ route('budgets.income',[start.format('Y-m-d'),end.format('Y-m-d')]) }}?page={{ page }}";#}
{#var updateIncomeUri = "{{ route('budgets.income',[start.format('Y-m-d'),end.format('Y-m-d')]) }}";#}
var periodStart = "{{ start.format('Y-m-d') }}";
var periodEnd = "{{ end.format('Y-m-d') }}";
</script>

View File

@@ -1,7 +1,7 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{#{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, budgetIds, start, end) }}#}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, categoryIds, start, end) }}
{% endblock %}
{% block content %}

View File

@@ -1,7 +1,7 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{#{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, expenseIds, start, end) }}#}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, doubleIds, start, end) }}
{% endblock %}
{% block content %}

View File

@@ -1,7 +1,7 @@
{% extends "./layout/default" %}
{% block breadcrumbs %}
{#{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, tagTags, start, end) }}#}
{{ Breadcrumbs.render(Route.getCurrentRoute.getName, accountIds, tagIds, start, end) }}
{% endblock %}
{% block content %}

View File

@@ -29,6 +29,7 @@
<p class="tagcloud">
{% for tagInfo in entries %}
<a style="font-size:{{ tagInfo.size }}px;" class="label label-success"
title="{{ tagInfo.created_at.formatLocalized(monthAndDayFormat) }}"
href="{{ route('tags.show',tagInfo.id) }}"><i class="fa fa-fw fa-tag"></i> {{ tagInfo.tag }}</a>
{% endfor %}
</p>

View File

@@ -774,16 +774,16 @@ try {
);
Breadcrumbs::register(
'reports.report.account',
function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $expenseIds, Carbon $start, Carbon $end) {
'reports.report.double',
function (BreadcrumbsGenerator $breadcrumbs, string $accountIds, string $doubleIds, Carbon $start, Carbon $end) {
$breadcrumbs->parent('reports.index');
$monthFormat = (string)trans('config.month_and_day');
$startString = $start->formatLocalized($monthFormat);
$endString = $end->formatLocalized($monthFormat);
$title = (string)trans('firefly.report_account', ['start' => $startString, 'end' => $endString]);
$title = (string)trans('firefly.report_double', ['start' => $startString, 'end' => $endString]);
$breadcrumbs->push($title, route('reports.report.account', [$accountIds, $expenseIds, $start->format('Ymd'), $end->format('Ymd')]));
$breadcrumbs->push($title, route('reports.report.double', [$accountIds, $doubleIds, $start->format('Ymd'), $end->format('Ymd')]));
}
);