Browse Source

Added notification for all successfull delete actions in Abp.

pull/12371/head
Fatih KILIÇ 4 years ago
parent
commit
2c7f375d13
  1. 4
      npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts
  2. 4
      npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts

4
npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts

@ -1,7 +1,7 @@
import { ListService, PagedAndSortedResultRequestDto, PagedResultDto } from '@abp/ng.core';
import { IdentityRoleDto, IdentityRoleService } from '@abp/ng.identity/proxy';
import { ePermissionManagementComponents } from '@abp/ng.permission-management';
import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared';
import {Confirmation, ConfirmationService, ToasterService} from '@abp/ng.theme.shared';
import {
EXTENSIONS_IDENTIFIER,
FormPropData,
@ -47,6 +47,7 @@ export class RolesComponent implements OnInit {
constructor(
public readonly list: ListService<PagedAndSortedResultRequestDto>,
protected confirmationService: ConfirmationService,
private toasterService: ToasterService,
protected injector: Injector,
protected service: IdentityRoleService,
) {}
@ -100,6 +101,7 @@ export class RolesComponent implements OnInit {
})
.subscribe((status: Confirmation.Status) => {
if (status === Confirmation.Status.confirm) {
this.toasterService.success('AbpSettingManagement::SuccessfullySaved');
this.service.delete(id).subscribe(() => this.list.get());
}
});

4
npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts

@ -1,7 +1,7 @@
import { ListService, PagedResultDto } from '@abp/ng.core';
import { eFeatureManagementComponents } from '@abp/ng.feature-management';
import { GetTenantsInput, TenantDto, TenantService } from '@abp/ng.tenant-management/proxy';
import { Confirmation, ConfirmationService } from '@abp/ng.theme.shared';
import {Confirmation, ConfirmationService, ToasterService} from '@abp/ng.theme.shared';
import {
EXTENSIONS_IDENTIFIER,
FormPropData,
@ -53,6 +53,7 @@ export class TenantsComponent implements OnInit {
private injector: Injector,
private confirmationService: ConfirmationService,
private service: TenantService,
private toasterService: ToasterService,
private fb: FormBuilder,
) {}
@ -107,6 +108,7 @@ export class TenantsComponent implements OnInit {
)
.subscribe((status: Confirmation.Status) => {
if (status === Confirmation.Status.confirm) {
this.toasterService.success('AbpSettingManagement::SuccessfullySaved');
this.service.delete(id).subscribe(() => this.list.get());
}
});

Loading…
Cancel
Save