refactor: import Confirmation namespace instead of Toaster

pull/2883/head
mehmet-erim 5 years ago
parent a9dfd23627
commit b9ba6b6820

@ -1,5 +1,5 @@
import { ABP } from '@abp/ng.core';
import { ConfirmationService, Toaster } from '@abp/ng.theme.shared';
import { ConfirmationService, Confirmation } from '@abp/ng.theme.shared';
import { Component, ElementRef, OnInit, ViewChild } from '@angular/core';
import { FormBuilder, FormControl, FormGroup, Validators } from '@angular/forms';
import { Select, Store } from '@ngxs/store';
@ -116,8 +116,8 @@ export class RolesComponent implements OnInit {
.warn('AbpIdentity::RoleDeletionConfirmationMessage', 'AbpIdentity::AreYouSure', {
messageLocalizationParams: [name],
})
.subscribe((status: Toaster.Status) => {
if (status === Toaster.Status.confirm) {
.subscribe((status: Confirmation.Status) => {
if (status === Confirmation.Status.confirm) {
this.store.dispatch(new DeleteRole(id)).subscribe(() => this.get());
}
});

@ -1,5 +1,5 @@
import { ABP } from '@abp/ng.core';
import { ConfirmationService, Toaster } from '@abp/ng.theme.shared';
import { ConfirmationService, Confirmation } from '@abp/ng.theme.shared';
import { Component, OnInit, TemplateRef, ViewChild, ChangeDetectorRef } from '@angular/core';
import { FormBuilder, FormGroup, Validators } from '@angular/forms';
import { Select, Store } from '@ngxs/store';
@ -239,8 +239,8 @@ export class TenantsComponent implements OnInit {
messageLocalizationParams: [name],
},
)
.subscribe((status: Toaster.Status) => {
if (status === Toaster.Status.confirm) {
.subscribe((status: Confirmation.Status) => {
if (status === Confirmation.Status.confirm) {
this.store.dispatch(new DeleteTenant(id)).subscribe(() => this.get());
}
});

@ -14,7 +14,7 @@ import {
import { fromEvent, Subject } from 'rxjs';
import { debounceTime, filter, takeUntil } from 'rxjs/operators';
import { fadeAnimation } from '../../animations/modal.animations';
import { Toaster } from '../../models/toaster';
import { Confirmation } from '../../models/confirmation';
import { ConfirmationService } from '../../services/confirmation.service';
import { ButtonComponent } from '../button/button.component';
@ -133,9 +133,9 @@ export class ModalComponent implements OnDestroy {
'AbpAccount::AreYouSureYouWantToCancelEditingWarningMessage',
'AbpAccount::AreYouSure',
)
.subscribe((status: Toaster.Status) => {
.subscribe((status: Confirmation.Status) => {
this.isConfirmationOpen = false;
if (status === Toaster.Status.confirm) {
if (status === Confirmation.Status.confirm) {
this.visible = false;
}
});

Loading…
Cancel
Save