From d3d66323758d88fbf3e1178a23f420b2fea41f42 Mon Sep 17 00:00:00 2001 From: sdarbinyan Date: Thu, 13 Aug 2026 08:46:17 +0400 Subject: [PATCH] fix: reports page never read facade.error(), silently showed 0/0 AdminAnalyticsFacade.error() already existed but the reports page template never checked it - a load failure just rendered the summary cards with default/zero values, looking like a legitimate empty report instead of a failure. Co-Authored-By: Claude Sonnet 5 --- .../admin/reports/pages/admin-reports-page.component.html | 2 ++ .../admin/reports/pages/admin-reports-page.component.ts | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/app/features/admin/reports/pages/admin-reports-page.component.html b/src/app/features/admin/reports/pages/admin-reports-page.component.html index 84e69c6..349ef11 100644 --- a/src/app/features/admin/reports/pages/admin-reports-page.component.html +++ b/src/app/features/admin/reports/pages/admin-reports-page.component.html @@ -6,6 +6,8 @@ } {{ 'common.loading' | translate }} + } @else if (facade.error()) { + } @else {
diff --git a/src/app/features/admin/reports/pages/admin-reports-page.component.ts b/src/app/features/admin/reports/pages/admin-reports-page.component.ts index cc5e6ef..d1331b7 100644 --- a/src/app/features/admin/reports/pages/admin-reports-page.component.ts +++ b/src/app/features/admin/reports/pages/admin-reports-page.component.ts @@ -3,11 +3,12 @@ import { AdminAnalyticsFacade } from '../../analytics/facade/admin-analytics.fac import { TranslatePipe } from '../../../../i18n/translate.pipe'; import { ButtonComponent } from '../../../../shared/ui/button/button.component'; import { SkeletonComponent } from '../../../../shared/ui/skeleton/skeleton.component'; +import { EmptyStateComponent } from '../../../../shared/ui/empty-state/empty-state.component'; @Component({ selector: 'app-admin-reports-page', standalone: true, - imports: [TranslatePipe, ButtonComponent, SkeletonComponent], + imports: [TranslatePipe, ButtonComponent, SkeletonComponent, EmptyStateComponent], templateUrl: './admin-reports-page.component.html', styleUrls: ['./admin-reports-page.component.scss'], changeDetection: ChangeDetectionStrategy.OnPush