From d150ddd89c34fe4af77d54d6245599d9b39c4987 Mon Sep 17 00:00:00 2001 From: mhuseinov <61513701+mhuseinov@users.noreply.github.com> Date: Wed, 29 May 2024 13:25:55 -0700 Subject: [PATCH] do not show success toast message if advanced search failed in ALCS (#1728) --- alcs-frontend/src/app/features/search/search.component.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/alcs-frontend/src/app/features/search/search.component.ts b/alcs-frontend/src/app/features/search/search.component.ts index 5b976bc9f0..63708b5777 100644 --- a/alcs-frontend/src/app/features/search/search.component.ts +++ b/alcs-frontend/src/app/features/search/search.component.ts @@ -6,7 +6,7 @@ import { MatTabGroup } from '@angular/material/tabs'; import { Title } from '@angular/platform-browser'; import { ActivatedRoute } from '@angular/router'; import moment from 'moment'; -import { combineLatestWith, map, Observable, startWith, Subject, takeUntil } from 'rxjs'; +import { Observable, Subject, combineLatestWith, map, startWith, takeUntil } from 'rxjs'; import { ApplicationRegionDto } from '../../services/application/application-code.dto'; import { ApplicationLocalGovernmentDto } from '../../services/application/application-local-government/application-local-government.dto'; import { ApplicationLocalGovernmentService } from '../../services/application/application-local-government/application-local-government.service'; @@ -196,7 +196,9 @@ export class SearchComponent implements OnInit, OnDestroy { const result = await this.searchService.advancedSearchFetch(searchParams); this.isLoading = false; - this.toastService.showSuccessToast('Results updated'); + if (result !== undefined) { + this.toastService.showSuccessToast('Results updated'); + } // push tab activation to next render cycle, after the tabGroup is rendered setTimeout(() => {