mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-26 13:36:15 +00:00
Tweak reports.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
/* globals google, startDate ,reportURL, endDate , reportType ,accountIds, lineChart, categoryReportUrl */
|
||||
/* globals google, startDate ,reportURL, endDate , reportType ,accountIds, lineChart, categoryReportUrl, balanceReportUrl */
|
||||
|
||||
|
||||
$(function () {
|
||||
@@ -6,6 +6,7 @@ $(function () {
|
||||
drawChart();
|
||||
|
||||
loadCategoryReport();
|
||||
loadBalanceReport();
|
||||
});
|
||||
|
||||
function loadCategoryReport() {
|
||||
@@ -14,6 +15,19 @@ function loadCategoryReport() {
|
||||
$.get(categoryReportUrl).done(placeCategoryReport).fail(failCategoryReport);
|
||||
}
|
||||
|
||||
function loadBalanceReport() {
|
||||
"use strict";
|
||||
console.log('Going to grab ' + categoryReportUrl);
|
||||
$.get(balanceReportUrl).done(placeBalanceReport).fail(failBalanceReport);
|
||||
}
|
||||
|
||||
function placeBalanceReport(data) {
|
||||
"use strict";
|
||||
$('#balanceReport').removeClass('loading').html(data);
|
||||
listLengthInitial();
|
||||
triggerInfoClick();
|
||||
}
|
||||
|
||||
function placeCategoryReport(data) {
|
||||
"use strict";
|
||||
$('#categoryReport').removeClass('loading').html(data);
|
||||
@@ -21,6 +35,12 @@ function placeCategoryReport(data) {
|
||||
triggerInfoClick();
|
||||
}
|
||||
|
||||
function failBalanceReport() {
|
||||
"use strict";
|
||||
console.log('Fail balance report data!');
|
||||
$('#balanceReport').removeClass('loading').addClass('general-chart-error');
|
||||
}
|
||||
|
||||
function failCategoryReport() {
|
||||
"use strict";
|
||||
console.log('Fail category report data!');
|
||||
|
||||
Reference in New Issue
Block a user