From 694d46c99cef92851703aec6356b79163f89992e Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 9 Oct 2024 15:31:55 +0200 Subject: [PATCH 1/3] MOBILE-4616 reports: Fix load more calculation --- .../components/report-detail/report-detail.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/core/features/reportbuilder/components/report-detail/report-detail.ts b/src/core/features/reportbuilder/components/report-detail/report-detail.ts index 3974047e0..69f0088d3 100644 --- a/src/core/features/reportbuilder/components/report-detail/report-detail.ts +++ b/src/core/features/reportbuilder/components/report-detail/report-detail.ts @@ -55,7 +55,7 @@ export class CoreReportBuilderReportDetailComponent implements OnInit { new BehaviorSubject({ report: null, loaded: false, - canLoadMoreRows: true, + canLoadMoreRows: false, errorLoadingRows: false, cardviewShowFirstTitle: false, cardVisibleColumns: 1, @@ -126,6 +126,7 @@ export class CoreReportBuilderReportDetailComponent implements OnInit { report, cardVisibleColumns: report.details.settingsdata.cardviewVisibleColumns, cardviewShowFirstTitle: report.details.settingsdata.cardviewShowFirstTitle, + canLoadMoreRows: report.data.totalrowcount > report.data.rows.length, }); this.logView(report); @@ -175,7 +176,6 @@ export class CoreReportBuilderReportDetailComponent implements OnInit { this.updateState({ page: 0, canLoadMoreRows: false }); await CoreUtils.ignoreErrors(this.getReport()); await ionRefresher?.complete(); - this.updateState({ canLoadMoreRows: true }); } /** @@ -225,12 +225,12 @@ export class CoreReportBuilderReportDetailComponent implements OnInit { ], }, }, + canLoadMoreRows: newReport.data.totalrowcount > report.data.rows.length + newReport.data.rows.length, }); } catch (error) { CoreDomUtils.showErrorModalDefault(error, 'Error loading more reports'); - this.updateState({ canLoadMoreRows: false }); - this.updateState({ errorLoadingRows: true }); + this.updateState({ canLoadMoreRows: false, errorLoadingRows: true }); } complete(); From 348567fdb1880734939877ac19113ea36ea6c57f Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 9 Oct 2024 15:32:20 +0200 Subject: [PATCH 2/3] MOBILE-4616 reports: Remove OnPush to avoid infinite-loading problem --- .../reportbuilder/components/report-detail/report-detail.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/core/features/reportbuilder/components/report-detail/report-detail.ts b/src/core/features/reportbuilder/components/report-detail/report-detail.ts index 69f0088d3..67d7cbf36 100644 --- a/src/core/features/reportbuilder/components/report-detail/report-detail.ts +++ b/src/core/features/reportbuilder/components/report-detail/report-detail.ts @@ -13,7 +13,7 @@ // limitations under the License. import { toBoolean } from '@/core/transforms/boolean'; -import { ChangeDetectionStrategy, Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; +import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; import { CoreError } from '@classes/errors/error'; import { CoreReportBuilder, @@ -37,7 +37,6 @@ import { map } from 'rxjs/operators'; selector: 'core-report-builder-report-detail', templateUrl: './report-detail.html', styleUrls: ['./report-detail.scss'], - changeDetection: ChangeDetectionStrategy.OnPush, }) export class CoreReportBuilderReportDetailComponent implements OnInit { From 5d3c637de007f89ad5a18d1e39474e58b5caaf98 Mon Sep 17 00:00:00 2001 From: Dani Palou Date: Wed, 9 Oct 2024 15:56:25 +0200 Subject: [PATCH 3/3] MOBILE-4616 badge: Fix filters in issuer name in badgeclass --- src/addons/badges/pages/badge-class/badge-class.html | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/addons/badges/pages/badge-class/badge-class.html b/src/addons/badges/pages/badge-class/badge-class.html index 3526081ea..099cc66e5 100644 --- a/src/addons/badges/pages/badge-class/badge-class.html +++ b/src/addons/badges/pages/badge-class/badge-class.html @@ -30,7 +30,9 @@

{{ 'addon.badges.issuername' | translate}}

-

{{ badge.issuer }}

+

+ +