🐛 (reports) fix reports page having empty blocks (#3566)

This commit is contained in:
Matiss Janis Aboltins
2024-10-07 08:33:53 +01:00
parent 4a1e1511bc
commit 2e569355bc
2 changed files with 26 additions and 10 deletions

View File

@@ -82,16 +82,26 @@ export function Overview() {
const isDashboardsFeatureEnabled = useFeatureFlag('dashboards');
const spendingReportFeatureFlag = useFeatureFlag('spendingReport');
const baseLayout = widgets.map(widget => ({
i: widget.id,
w: widget.width,
h: widget.height,
minW:
isCustomReportWidget(widget) || widget.type === 'markdown-card' ? 2 : 3,
minH:
isCustomReportWidget(widget) || widget.type === 'markdown-card' ? 1 : 2,
...widget,
}));
const baseLayout = widgets
.map(widget => ({
i: widget.id,
w: widget.width,
h: widget.height,
minW:
isCustomReportWidget(widget) || widget.type === 'markdown-card' ? 2 : 3,
minH:
isCustomReportWidget(widget) || widget.type === 'markdown-card' ? 1 : 2,
...widget,
}))
.filter(item => {
if (isDashboardsFeatureEnabled) {
return true;
}
if (item.type === 'custom-report' && !customReportMap.has(item.meta.id)) {
return false;
}
return true;
});
const layout =
spendingReportFeatureFlag &&

View File

@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatissJanis]
---
Reports: fix old reports page having empty blocks.