mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-03 03:00:14 +00:00
Revamp multi-account report.
This commit is contained in:
32
public/v1/js/ff/reports/account/month.js
vendored
32
public/v1/js/ff/reports/account/month.js
vendored
@@ -1,32 +0,0 @@
|
||||
/*
|
||||
* month.js
|
||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
/** global: spentUri, categoryUri, budgetUri, expenseUri, incomeUri, mainUri */
|
||||
$(function () {
|
||||
"use strict";
|
||||
doubleYChart(mainUri, 'in-out-chart');
|
||||
|
||||
loadAjaxPartial('inOutAccounts', spentUri);
|
||||
loadAjaxPartial('inOutCategory', categoryUri);
|
||||
loadAjaxPartial('inOutBudget', budgetUri);
|
||||
loadAjaxPartial('topXexpense', expenseUri);
|
||||
loadAjaxPartial('topXincome', incomeUri);
|
||||
|
||||
});
|
||||
|
43
public/v1/js/ff/reports/double/month.js
vendored
Normal file
43
public/v1/js/ff/reports/double/month.js
vendored
Normal file
@@ -0,0 +1,43 @@
|
||||
/*
|
||||
* month.js
|
||||
* Copyright (c) 2017 thegrumpydictator@gmail.com
|
||||
*
|
||||
* This file is part of Firefly III.
|
||||
*
|
||||
* Firefly III is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* Firefly III is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Firefly III. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
$(function () {
|
||||
"use strict";
|
||||
|
||||
loadAjaxPartial('opsAccounts', opsAccountsUri);
|
||||
loadAjaxPartial('opsAccountsAsset', opsAccountsAssetUri);
|
||||
|
||||
multiCurrencyPieChart(categoryOutUri, 'category-out-pie-chart');
|
||||
multiCurrencyPieChart(categoryInUri, 'category-in-pie-chart');
|
||||
multiCurrencyPieChart(budgetsOutUri, 'budgets-out-pie-chart');
|
||||
multiCurrencyPieChart(tagOutUri, 'tag-out-pie-chart');
|
||||
multiCurrencyPieChart(tagInUri, 'tag-in-pie-chart');
|
||||
|
||||
$.each($('.main_double_canvas'), function (i, v) {
|
||||
var canvas = $(v);
|
||||
columnChart(canvas.data('url'), canvas.attr('id'));
|
||||
});
|
||||
|
||||
loadAjaxPartial('topExpensesHolder', topExpensesUri);
|
||||
loadAjaxPartial('avgExpensesHolder', avgExpensesUri);
|
||||
loadAjaxPartial('topIncomeHolder', topIncomeUri);
|
||||
loadAjaxPartial('avgIncomeHolder', avgIncomeUri);
|
||||
|
||||
});
|
||||
|
12
public/v1/js/ff/reports/index.js
vendored
12
public/v1/js/ff/reports/index.js
vendored
@@ -132,13 +132,13 @@ function setOptionalFromCookies() {
|
||||
$('#inputTags').multiselect(defaultMultiSelect);
|
||||
|
||||
// and expense/revenue thing
|
||||
if ((readCookie('report-exp-rev') !== null)) {
|
||||
arr = readCookie('report-exp-rev').split(',');
|
||||
if ((readCookie('report-double') !== null)) {
|
||||
arr = readCookie('report-double').split(',');
|
||||
arr.forEach(function (val) {
|
||||
$('#inputExpRevAccounts').find('option[value="' + encodeURI(val) + '"]').prop('selected', true);
|
||||
$('#inputDoubleAccounts').find('option[value="' + encodeURI(val) + '"]').prop('selected', true);
|
||||
});
|
||||
}
|
||||
$('#inputExpRevAccounts').multiselect(defaultMultiSelect);
|
||||
$('#inputDoubleAccounts').multiselect(defaultMultiSelect);
|
||||
|
||||
|
||||
}
|
||||
@@ -153,7 +153,7 @@ function catchSubmit() {
|
||||
var categories = $('#inputCategories').val();
|
||||
var budgets = $('#inputBudgets').val();
|
||||
var tags = $('#inputTags').val();
|
||||
var expRev = $('#inputExpRevAccounts').val();
|
||||
var double = $('#inputDoubleAccounts').val();
|
||||
|
||||
// remember all
|
||||
// set cookie to remember choices.
|
||||
@@ -162,7 +162,7 @@ function catchSubmit() {
|
||||
createCookie('report-categories', categories, 365);
|
||||
createCookie('report-budgets', budgets, 365);
|
||||
createCookie('report-tags', tags, 365);
|
||||
createCookie('report-exp-rev', expRev, 365);
|
||||
createCookie('report-double', double, 365);
|
||||
createCookie('report-start', moment(picker.startDate).format("YYYYMMDD"), 365);
|
||||
createCookie('report-end', moment(picker.endDate).format("YYYYMMDD"), 365);
|
||||
|
||||
|
Reference in New Issue
Block a user