RED-7619 add config to toaster rawError method
This commit is contained in:
parent
a6383c1dbc
commit
85fba4a1dd
@ -1,12 +1,12 @@
|
||||
import { HttpErrorResponse, HttpStatusCode } from '@angular/common/http';
|
||||
import { Injectable } from '@angular/core';
|
||||
import { ActiveToast, ToastrService } from 'ngx-toastr';
|
||||
import { IndividualConfig } from 'ngx-toastr/toastr/toastr-config';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { HttpErrorResponse, HttpStatusCode } from '@angular/common/http';
|
||||
import { ActiveToast, ToastrService } from 'ngx-toastr';
|
||||
import { IndividualConfig } from 'ngx-toastr/toastr/toastr-config';
|
||||
import { filter, tap } from 'rxjs/operators';
|
||||
import { ErrorMessageService } from './error-message.service';
|
||||
import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
|
||||
|
||||
const enum NotificationType {
|
||||
SUCCESS = 'SUCCESS',
|
||||
@ -65,8 +65,8 @@ export class Toaster {
|
||||
return this._toastr.error(resultedMsg, options?.title, options);
|
||||
}
|
||||
|
||||
rawError(message: string) {
|
||||
return this._toastr.error(message);
|
||||
rawError(message: string, config?: Partial<IndividualConfig<unknown>>) {
|
||||
return this._toastr.error(message, undefined, config);
|
||||
}
|
||||
|
||||
info(message: string, options?: Partial<ToasterOptions>): ActiveToast<unknown> {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user