Skip to content

Commit

Permalink
🐛 (reports) fix reports page having empty blocks (#3566)
Browse files Browse the repository at this point in the history
  • Loading branch information
MatissJanis authored Oct 7, 2024
1 parent 38c5f89 commit 0b6ea52
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 10 deletions.
30 changes: 20 additions & 10 deletions packages/desktop-client/src/components/reports/Overview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 &&
Expand Down
6 changes: 6 additions & 0 deletions upcoming-release-notes/3566.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
category: Bugfix
authors: [MatissJanis]
---

Reports: fix old reports page having empty blocks.

0 comments on commit 0b6ea52

Please sign in to comment.