Also include budget in currency conversion.

This commit is contained in:
James Cole
2025-07-30 09:59:52 +02:00
parent 6bdff95d87
commit 30da3f4399
7 changed files with 120 additions and 64 deletions

View File

@@ -48,9 +48,19 @@ export default () => ({
}
this.getFreshData();
},
eventListeners: {
['@convert-to-native.window'](event){
console.log('I heard that! (dashboard/budgets)');
this.convertToNative = event.detail;
chartData = null;
this.loadChart();
}
},
drawChart(options) {
if (null !== chart) {
chart.data.datasets = options.data.datasets;
chart.data = options.data;
chart.update();
return;
}
@@ -59,7 +69,7 @@ export default () => ({
getFreshData() {
const start = new Date(window.store.get('start'));
const end = new Date(window.store.get('end'));
const cacheKey = getCacheKey('ds_bdg_chart', {start: start, end: end});
const cacheKey = getCacheKey('ds_bdg_chart', {convertToNative: this.convertToNative, start: start, end: end});
//const cacheValid = window.store.get('cacheValid');
const cacheValid = false;
let cachedData = window.store.get(cacheKey);