feat(table): Table with Time Comparison (#28057)

Co-authored-by: Lily Kuang <lily@preset.io>
Co-authored-by: lilykuang <jialikuang@gmail.com>
Co-authored-by: Kamil Gabryjelski <kamil.gabryjelski@gmail.com>
This commit is contained in:
Antonio Rivero
2024-06-14 20:21:43 +02:00
committed by GitHub
parent 37753cbdc2
commit 7ddea62331
36 changed files with 3722 additions and 543 deletions

View File

@@ -89,11 +89,11 @@ export default function PopKPI(props: PopKPIProps) {
if (!currentTimeRangeFilter || (!shift && !startDateOffset)) {
setComparisonRange('');
} else if (!isEmpty(shift) || startDateOffset) {
const newShift = getTimeOffset(
currentTimeRangeFilter,
ensureIsArray(shift),
startDateOffset || '',
);
const newShift = getTimeOffset({
timeRangeFilter: currentTimeRangeFilter,
shifts: ensureIsArray(shift),
startDate: startDateOffset || '',
});
const promise: any = fetchTimeRange(
(currentTimeRangeFilter as any).comparator,
currentTimeRangeFilter.subject,