mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-12-23 03:31:25 +00:00
Rebuild frontend.
This commit is contained in:
@@ -186,20 +186,20 @@ export default {
|
||||
},
|
||||
|
||||
generateWeekly: function () {
|
||||
console.log('weekly');
|
||||
//console.log('weekly');
|
||||
let today = new Date(this.range.start);
|
||||
console.log('Today is ' + today);
|
||||
//console.log('Today is ' + today);
|
||||
let start = startOfDay(startOfWeek(subDays(today, 7), {weekStartsOn: 1}));
|
||||
let end = endOfDay(endOfWeek(subDays(today, 7), {weekStartsOn: 1}));
|
||||
let dateFormat = this.$t('config.week_in_year_fns');
|
||||
console.log('Date format: "'+dateFormat+'"');
|
||||
//console.log('Date format: "'+dateFormat+'"');
|
||||
let title = format(start, dateFormat);
|
||||
|
||||
// last week
|
||||
console.log('Last week');
|
||||
console.log(start);
|
||||
console.log(end);
|
||||
console.log(title);
|
||||
// console.log('Last week');
|
||||
// console.log(start);
|
||||
// console.log(end);
|
||||
// console.log(title);
|
||||
this.periods.push(
|
||||
{
|
||||
start: start.toDateString(),
|
||||
@@ -212,10 +212,10 @@ export default {
|
||||
start = startOfDay(startOfWeek(today, {weekStartsOn: 1}));
|
||||
end = endOfDay(endOfWeek(today, {weekStartsOn: 1}));
|
||||
title = format(start, dateFormat);
|
||||
console.log('This week');
|
||||
console.log(start);
|
||||
console.log(end);
|
||||
console.log(title);
|
||||
// console.log('This week');
|
||||
// console.log(start);
|
||||
// console.log(end);
|
||||
// console.log(title);
|
||||
this.periods.push(
|
||||
{
|
||||
start: start.toDateString(),
|
||||
@@ -228,10 +228,10 @@ export default {
|
||||
start = startOfDay(startOfWeek(addDays(today, 7), {weekStartsOn: 1}));
|
||||
end = endOfDay(endOfWeek(addDays(today, 7), {weekStartsOn: 1}));
|
||||
title = format(start, dateFormat);
|
||||
console.log('Next week');
|
||||
console.log(start);
|
||||
console.log(end);
|
||||
console.log(title);
|
||||
// console.log('Next week');
|
||||
// console.log(start);
|
||||
// console.log(end);
|
||||
// console.log(title);
|
||||
this.periods.push(
|
||||
{
|
||||
start: start.toDateString(),
|
||||
|
||||
@@ -123,13 +123,14 @@ export default {
|
||||
drawChart: function () {
|
||||
//console.log('drawChart');
|
||||
if ('undefined' !== typeof this._chart) {
|
||||
//console.log('destroy or update!');
|
||||
// console.log('update!');
|
||||
this._chart.data = this.dataCollection;
|
||||
this._chart.update();
|
||||
this.initialised = true;
|
||||
}
|
||||
|
||||
if ('undefined' === typeof this._chart) {
|
||||
//console.log('new!');
|
||||
// console.log('new!');
|
||||
this._chart = new ChartJs.Chart(this.$refs.canvas.getContext('2d'), {
|
||||
type: 'line',
|
||||
data: this.dataCollection,
|
||||
@@ -140,9 +141,9 @@ export default {
|
||||
}
|
||||
},
|
||||
updateChart: function () {
|
||||
//console.log('updateChart');
|
||||
// console.log('updateChart');
|
||||
if (this.initialised) {
|
||||
//console.log('MUST Update chart!');
|
||||
// console.log('MUST Update chart!');
|
||||
// reset some vars so it wont trigger again:
|
||||
this.initialised = false;
|
||||
this.initialiseChart();
|
||||
|
||||
@@ -179,9 +179,9 @@ const actions = {
|
||||
end = endOfDay(end);
|
||||
break;
|
||||
}
|
||||
console.log('Range is ' + viewRange);
|
||||
console.log('Start is ' + start);
|
||||
console.log('End is ' + end);
|
||||
// console.log('Range is ' + viewRange);
|
||||
// console.log('Start is ' + start);
|
||||
// console.log('End is ' + end);
|
||||
context.commit('setStart', start);
|
||||
context.commit('setEnd', end);
|
||||
context.commit('setDefaultStart', start);
|
||||
|
||||
Reference in New Issue
Block a user