mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Code for #1244
This commit is contained in:
parent
4304a3c916
commit
cfba11e9ca
@ -304,6 +304,7 @@ class AccountController extends Controller
|
||||
throw new FireflyException('End is after start!'); // @codeCoverageIgnore
|
||||
}
|
||||
|
||||
$today = new Carbon;
|
||||
$subTitleIcon = config('firefly.subIconsByIdentifier.' . $account->accountType->type);
|
||||
$page = intval($request->get('page'));
|
||||
$pageSize = intval(Preferences::get('listPageSize', 50)->data);
|
||||
@ -327,7 +328,7 @@ class AccountController extends Controller
|
||||
|
||||
return view(
|
||||
'accounts.show',
|
||||
compact('account', 'currency', 'periods', 'subTitleIcon', 'transactions', 'subTitle', 'start', 'end', 'chartUri')
|
||||
compact('account', 'currency','today', 'periods', 'subTitleIcon', 'transactions', 'subTitle', 'start', 'end', 'chartUri')
|
||||
);
|
||||
}
|
||||
|
||||
|
4
public/js/ff/charts.js
vendored
4
public/js/ff/charts.js
vendored
@ -312,8 +312,8 @@ function drawAChart(URI, container, chartType, options, colorData) {
|
||||
fontSize: 12,
|
||||
fontColor: "#333",
|
||||
position: "right",
|
||||
xAdjust: 0,
|
||||
yAdjust: -120,
|
||||
xAdjust: -20,
|
||||
yAdjust: -125,
|
||||
enabled: true,
|
||||
content: todayText
|
||||
}
|
||||
|
@ -149,8 +149,15 @@
|
||||
var expenseBudgetUri = '{{ route('chart.account.expense-budget', [account.id, start.format('Ymd'), end.format('Ymd')]) }}';
|
||||
{% endif %}
|
||||
|
||||
var drawVerticalLine = '';
|
||||
{# render vertical line with text "today" #}
|
||||
{% if start.lte(today) and end.gte(today) %}
|
||||
drawVerticalLine = '{{ today.formatLocalized(monthAndDayFormat) }}';
|
||||
{% endif %}
|
||||
|
||||
</script>
|
||||
<script type="text/javascript" src="js/lib/Chart.bundle.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/lib/chartjs-plugin-annotation.min.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/charts.defaults.js?v={{ FF_VERSION }}"></script>
|
||||
<script type="text/javascript" src="js/ff/charts.js?v={{ FF_VERSION }}"></script>
|
||||
|
||||
|
@ -188,7 +188,6 @@
|
||||
var accountRevenueUri = '{{ route('chart.account.revenue') }}';
|
||||
var accountExpenseUri = '{{ route('chart.account.expense') }}';
|
||||
var piggyInfoUri = '{{ route('json.fp.piggy-banks') }}';
|
||||
var todayText = ' {{ trans('firefly.today')|escape('js') }}';
|
||||
var drawVerticalLine = '';
|
||||
{# render vertical line with text "today" #}
|
||||
{% if start.lte(today) and end.gte(today) %}
|
||||
|
@ -39,6 +39,7 @@ var accountingConfig = {{ accounting|json_encode|raw }};
|
||||
var token = '{{ csrf_token() }}';
|
||||
var sessionStart = '{{ session('start').format('Y-m-d') }}';
|
||||
var sessionEnd = '{{ session('end').format('Y-m-d') }}';
|
||||
var todayText = ' {{ trans('firefly.today')|escape('js') }}';
|
||||
|
||||
// some formatting stuff:
|
||||
var month_and_day_js = "{{ trans('config.month_and_day_js') }}";
|
||||
|
Loading…
Reference in New Issue
Block a user