autocomplete off bei numeric fields, Mail Mask emptied after Mail dispatch, unknown listing controller for EMail Listings
This commit is contained in:
@@ -2,7 +2,7 @@ import { HttpClient } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActivatedRouteSnapshot, CanActivate, Router, RouterStateSnapshot, UrlTree } from '@angular/router';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { catchError, map } from 'rxjs/operators';
|
||||
import { catchError, tap } from 'rxjs/operators';
|
||||
import { environment } from '../../environments/environment';
|
||||
|
||||
@Injectable({
|
||||
@@ -17,14 +17,14 @@ export class ListingCategoryGuard implements CanActivate {
|
||||
const url = `${this.apiBaseUrl}/bizmatch/listings/undefined/${id}`;
|
||||
|
||||
return this.http.get<any>(url).pipe(
|
||||
map(response => {
|
||||
tap(response => {
|
||||
const category = response.listingsCategory;
|
||||
if (category === 'business') {
|
||||
return this.router.createUrlTree([`/details-business-listing/${id}`]);
|
||||
this.router.navigate(['details-business-listing', id]);
|
||||
} else if (category === 'commercialProperty') {
|
||||
return this.router.createUrlTree([`/details-commercial-property-listing/${id}`]);
|
||||
this.router.navigate(['details-commercial-property-listing', id]);
|
||||
} else {
|
||||
return this.router.createUrlTree(['/not-found']);
|
||||
this.router.navigate(['not-found']);
|
||||
}
|
||||
}),
|
||||
catchError(() => {
|
||||
|
||||
Reference in New Issue
Block a user