Skip to content

Commit

Permalink
do not show success toast message if advanced search failed in ALCS (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mhuseinov authored May 29, 2024
1 parent 4e93436 commit d150ddd
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions alcs-frontend/src/app/features/search/search.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down Expand Up @@ -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(() => {
Expand Down

0 comments on commit d150ddd

Please sign in to comment.