Browse Source

Merge pull request #12371 from abpframework/10354

Added notification for user successfull delete action in Abp.
pull/12444/head
Muhammed Altuğ 5 years ago
committed by GitHub
parent
commit
c8c310b9ad
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.ts
  2. 7
      npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts
  3. 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('AbpUi::SuccessfullyDeleted');
this.service.delete(id).subscribe(() => this.list.get());
}
});

7
npm/ng-packs/packages/identity/src/lib/components/users/users.component.ts

@ -6,7 +6,7 @@ import {
IdentityUserService,
} 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,
@ -75,6 +75,7 @@ export class UsersComponent implements OnInit {
public readonly list: ListService<GetIdentityUsersInput>,
protected confirmationService: ConfirmationService,
protected service: IdentityUserService,
private toasterService: ToasterService,
protected fb: FormBuilder,
protected injector: Injector,
) {}
@ -163,7 +164,9 @@ export class UsersComponent implements OnInit {
})
.subscribe((status: Confirmation.Status) => {
if (status === Confirmation.Status.confirm) {
this.service.delete(id).subscribe(() => this.list.get());
this.service.delete(id).subscribe(() => {
this.toasterService.success('AbpUi::SuccessfullyDeleted');
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('AbpUi::SuccessfullyDeleted');
this.service.delete(id).subscribe(() => this.list.get());
}
});

Loading…
Cancel
Save