From ab4631526b266ff0d34ca55646107f8b0c5888b9 Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Thu, 23 May 2024 17:32:44 +0300 Subject: [PATCH] dashboard recent-activity bug fix --- .../recent-edited-activity.component.html | 2 +- .../recent-edited-activity/recent-edited-activity.component.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.html b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.html index 26e66d4f9..068aba604 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.html +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.html @@ -40,7 +40,7 @@
{{'GENERAL.ACTIONS.NO-MORE-AVAILABLE' | translate}}
-
+
diff --git a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts index e01451dda..eaefa4871 100644 --- a/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts +++ b/dmp-frontend/src/app/ui/dashboard/recent-edited-activity/recent-edited-activity.component.ts @@ -38,6 +38,7 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn currentPage: number = 0; pageSize: number = 5; listingItems: RecentActivityItem[]= []; + foundLastPage: boolean = false; // in case the total-items-count is equal to this.pageSize*this.currentPage @Input() type: string; @Input() includeDescriptions: boolean = false; @@ -190,6 +191,7 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn this.listingItems = this.listingItems.slice(0, this.listingItems.length-latestBatchCount); this._setPage(this.currentPage-1); + this.foundLastPage = false; return; } @@ -227,6 +229,7 @@ export class RecentEditedActivityComponent extends BaseComponent implements OnIn private _resetPagination(): void { if (this.listingItems.length == 0) this.currentPage = 0; else this.currentPage = Math.ceil(this.listingItems.length/this.pageSize); + this.foundLastPage = true; this.updateUrl(); }