1
0
mirror of https://github.com/beestat/app.git synced 2025-05-24 02:14:03 -04:00

Added a couple more presets to the data download

This commit is contained in:
Jon Ziebell 2021-03-04 21:45:22 -05:00
parent 1c623854ef
commit 56972013fb

View File

@ -147,12 +147,32 @@ beestat.component.modal.download_data.prototype.decorate_presets_ = function(par
'range_end': now.clone(),
'button': new beestat.component.button()
},
{
'label': 'Last Week',
'range_begin': now.clone()
.subtract(1, 'week')
.startOf('week'),
'range_end': now.clone()
.subtract(1, 'week')
.endOf('week'),
'button': new beestat.component.button()
},
{
'label': 'This Month',
'range_begin': now.clone().startOf('month'),
'range_end': now.clone(),
'button': new beestat.component.button()
},
{
'label': 'Last Month',
'range_begin': now.clone()
.subtract(1, 'month')
.startOf('month'),
'range_end': now.clone()
.subtract(1, 'month')
.endOf('month'),
'button': new beestat.component.button()
},
{
'label': 'All Time',
'range_begin': moment.max(moment(thermostat.first_connected), now.clone().subtract(1, 'year')),