From 4922fd107668680425a5c4614c23ec2bb64f82af Mon Sep 17 00:00:00 2001 From: Abu Sadaf <116058905+sadaf895@users.noreply.github.com> Date: Thu, 31 Oct 2024 13:46:31 +0530 Subject: [PATCH] fix(dashboard): improve layout of entity-count widget (#2643) closes #2638 --- .../dashboard-list-widget.component.html | 7 +++++-- .../dashboard-list-widget.component.ts | 1 + .../entity-count-dashboard.component.html | 18 +++++++++++++++--- .../entity-count-dashboard.component.scss | 7 ++++++- .../entity-count-dashboard.stories.ts | 6 +++++- 5 files changed, 32 insertions(+), 7 deletions(-) diff --git a/src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.html b/src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.html index ddb721d21f..569c099f3f 100644 --- a/src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.html +++ b/src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.html @@ -22,9 +22,12 @@ diff --git a/src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.ts b/src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.ts index 708d6fef2d..754f391e01 100644 --- a/src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.ts +++ b/src/app/core/dashboard/dashboard-list-widget/dashboard-list-widget.component.ts @@ -63,6 +63,7 @@ export class DashboardListWidgetComponent /** optional tooltip to explain detailed meaning of this widget / statistic */ @Input() explanation: string; @Input() headline: string; + @Input() paginationPageSize: number = 5; // Default to 5 entries per page /** * array of items to be displayed in paginated widget table. diff --git a/src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.html b/src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.html index fd7a67f9ef..81b163166e 100644 --- a/src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.html +++ b/src/app/features/dashboard-widgets/entity-count-dashboard-widget/entity-count-dashboard/entity-count-dashboard.component.html @@ -4,8 +4,17 @@ [title]="totalEntities" [subtitle]="label" [entries]="entityGroupCounts[groupBy[currentGroupIndex]]" + [paginationPageSize]="4" > -
+
+
+
= ( export const Primary = { args: { entityType: "TestEntity", - groupBy: ["category", "other"], + groupBy: ["other"], }, };