Merge pull request #8834 from ChantsovaEkaterina/bug/widget-data-not-loading-for-particular-timewindow-intervals
Fixed loading widget data for 'previous quarter' and 'previous half year' timewindow intervals
This commit is contained in:
commit
c1b83cb276
@ -452,6 +452,15 @@ export const calculateIntervalStartTime = (interval: QuickTimeInterval, currentD
|
|||||||
case QuickTimeInterval.PREVIOUS_MONTH:
|
case QuickTimeInterval.PREVIOUS_MONTH:
|
||||||
currentDate.subtract(1, 'months');
|
currentDate.subtract(1, 'months');
|
||||||
return currentDate.startOf('month');
|
return currentDate.startOf('month');
|
||||||
|
case QuickTimeInterval.PREVIOUS_QUARTER:
|
||||||
|
currentDate.subtract(1, 'quarter');
|
||||||
|
return currentDate.startOf('quarter');
|
||||||
|
case QuickTimeInterval.PREVIOUS_HALF_YEAR:
|
||||||
|
if (currentDate.get('quarter') < 3) {
|
||||||
|
return currentDate.startOf('year').subtract(2, 'quarters');
|
||||||
|
} else {
|
||||||
|
return currentDate.startOf('year');
|
||||||
|
}
|
||||||
case QuickTimeInterval.PREVIOUS_YEAR:
|
case QuickTimeInterval.PREVIOUS_YEAR:
|
||||||
currentDate.subtract(1, 'years');
|
currentDate.subtract(1, 'years');
|
||||||
return currentDate.startOf('year');
|
return currentDate.startOf('year');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user