Skip to content

Commit ea2b593

Browse files
Resolved conflicts
1 parent 2a42e39 commit ea2b593

File tree

4 files changed

+243
-518
lines changed

4 files changed

+243
-518
lines changed

angular/src/app/roles/roles.component.ts

Lines changed: 69 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -3,18 +3,18 @@ import { MatDialog } from '@angular/material';
33
import { finalize } from 'rxjs/operators';
44
import { appModuleAnimation } from '@shared/animations/routerTransition';
55
import {
6-
PagedListingComponentBase,
7-
PagedRequestDto
6+
PagedListingComponentBase,
7+
PagedRequestDto
88
} from '@shared/paged-listing-component-base';
99
import {
10-
RoleServiceProxy,
11-
RoleDto,
12-
PagedResultDtoOfRoleDto
10+
RoleServiceProxy,
11+
RoleDto,
12+
PagedResultDtoOfRoleDto
1313
} from '@shared/service-proxies/service-proxies';
1414
import { CreateRoleDialogComponent } from './create-role/create-role-dialog.component';
1515
import { EditRoleDialogComponent } from './edit-role/edit-role-dialog.component';
1616

17-
class PagedRolesRequestDto extends PagedRequestDto{
17+
class PagedRolesRequestDto extends PagedRequestDto {
1818
keyword: string;
1919
}
2020

@@ -23,75 +23,75 @@ class PagedRolesRequestDto extends PagedRequestDto{
2323
animations: [appModuleAnimation()]
2424
})
2525
export class RolesComponent extends PagedListingComponentBase<RoleDto> {
26-
roles: RoleDto[] = [];
26+
roles: RoleDto[] = [];
2727

28-
constructor(
29-
injector: Injector,
30-
private _rolesService: RoleServiceProxy,
31-
private _dialog: MatDialog
32-
) {
33-
super(injector);
34-
}
35-
36-
list(
37-
request: PagedRequestDto,
38-
pageNumber: number,
39-
finishedCallback: Function
40-
): void {
41-
this._rolesService
42-
.getAll(request.skipCount, request.maxResultCount)
43-
.pipe(
44-
finalize(() => {
45-
finishedCallback();
46-
})
47-
)
48-
.subscribe((result: PagedResultDtoOfRoleDto) => {
49-
this.roles = result.items;
50-
this.showPaging(result, pageNumber);
51-
});
52-
}
28+
constructor(
29+
injector: Injector,
30+
private _rolesService: RoleServiceProxy,
31+
private _dialog: MatDialog
32+
) {
33+
super(injector);
34+
}
5335

54-
delete(role: RoleDto): void {
55-
abp.message.confirm(
56-
this.l('RoleDeleteWarningMessage', role.displayName),
57-
(result: boolean) => {
58-
if (result) {
59-
this._rolesService
60-
.delete(role.id)
36+
list(
37+
request: PagedRolesRequestDto,
38+
pageNumber: number,
39+
finishedCallback: Function
40+
): void {
41+
this._rolesService
42+
.getAll(request.keyword, request.skipCount, request.maxResultCount)
6143
.pipe(
62-
finalize(() => {
63-
abp.notify.success(this.l('SuccessfullyDeleted'));
64-
this.refresh();
65-
})
44+
finalize(() => {
45+
finishedCallback();
46+
})
6647
)
67-
.subscribe(() => { });
68-
}
69-
}
70-
);
71-
}
48+
.subscribe((result: PagedResultDtoOfRoleDto) => {
49+
this.roles = result.items;
50+
this.showPaging(result, pageNumber);
51+
});
52+
}
53+
54+
delete(role: RoleDto): void {
55+
abp.message.confirm(
56+
this.l('RoleDeleteWarningMessage', role.displayName),
57+
(result: boolean) => {
58+
if (result) {
59+
this._rolesService
60+
.delete(role.id)
61+
.pipe(
62+
finalize(() => {
63+
abp.notify.success(this.l('SuccessfullyDeleted'));
64+
this.refresh();
65+
})
66+
)
67+
.subscribe(() => { });
68+
}
69+
}
70+
);
71+
}
72+
73+
createRole(): void {
74+
this.showCreateOrEditRoleDialog();
75+
}
7276

73-
createRole(): void {
74-
this.showCreateOrEditRoleDialog();
75-
}
77+
editRole(role: RoleDto): void {
78+
this.showCreateOrEditRoleDialog(role.id);
79+
}
7680

77-
editRole(role: RoleDto): void {
78-
this.showCreateOrEditRoleDialog(role.id);
79-
}
81+
showCreateOrEditRoleDialog(id?: number): void {
82+
let createOrEditRoleDialog;
83+
if (id === undefined || id <= 0) {
84+
createOrEditRoleDialog = this._dialog.open(CreateRoleDialogComponent);
85+
} else {
86+
createOrEditRoleDialog = this._dialog.open(EditRoleDialogComponent, {
87+
data: id
88+
});
89+
}
8090

81-
showCreateOrEditRoleDialog(id?: number): void {
82-
let createOrEditRoleDialog;
83-
if (id === undefined || id <= 0) {
84-
createOrEditRoleDialog = this._dialog.open(CreateRoleDialogComponent);
85-
} else {
86-
createOrEditRoleDialog = this._dialog.open(EditRoleDialogComponent, {
87-
data: id
88-
});
91+
createOrEditRoleDialog.afterClosed().subscribe(result => {
92+
if (result) {
93+
this.refresh();
94+
}
95+
});
8996
}
90-
91-
createOrEditRoleDialog.afterClosed().subscribe(result => {
92-
if (result) {
93-
this.refresh();
94-
}
95-
});
96-
}
9797
}

angular/src/app/tenants/tenants.component.ts

Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -3,96 +3,96 @@ import { MatDialog } from '@angular/material';
33
import { finalize } from 'rxjs/operators';
44
import { appModuleAnimation } from '@shared/animations/routerTransition';
55
import {
6-
PagedListingComponentBase,
7-
PagedRequestDto
6+
PagedListingComponentBase,
7+
PagedRequestDto
88
} from 'shared/paged-listing-component-base';
99
import {
10-
TenantServiceProxy,
11-
TenantDto,
12-
PagedResultDtoOfTenantDto
10+
TenantServiceProxy,
11+
TenantDto,
12+
PagedResultDtoOfTenantDto
1313
} from '@shared/service-proxies/service-proxies';
1414
import { CreateTenantDialogComponent } from './create-tenant/create-tenant-dialog.component';
1515
import { EditTenantDialogComponent } from './edit-tenant/edit-tenant-dialog.component';
1616

17-
class PagedTenantsRequestDto extends PagedRequestDto{
17+
class PagedTenantsRequestDto extends PagedRequestDto {
1818
keyword: string;
1919
isActive: boolean | null;
2020
}
2121

2222
@Component({
23-
templateUrl: './tenants.component.html',
24-
animations: [appModuleAnimation()]
23+
templateUrl: './tenants.component.html',
24+
animations: [appModuleAnimation()]
2525
})
2626
export class TenantsComponent extends PagedListingComponentBase<TenantDto> {
27-
tenants: TenantDto[] = [];
27+
tenants: TenantDto[] = [];
2828

29-
constructor(
30-
injector: Injector,
31-
private _tenantService: TenantServiceProxy,
32-
private _dialog: MatDialog
33-
) {
34-
super(injector);
35-
}
36-
37-
list(
38-
request: PagedRequestDto,
39-
pageNumber: number,
40-
finishedCallback: Function
41-
): void {
42-
this._tenantService
43-
.getAll(request.skipCount, request.maxResultCount)
44-
.pipe(
45-
finalize(() => {
46-
finishedCallback();
47-
})
48-
)
49-
.subscribe((result: PagedResultDtoOfTenantDto) => {
50-
this.tenants = result.items;
51-
this.showPaging(result, pageNumber);
52-
});
53-
}
29+
constructor(
30+
injector: Injector,
31+
private _tenantService: TenantServiceProxy,
32+
private _dialog: MatDialog
33+
) {
34+
super(injector);
35+
}
5436

55-
delete(tenant: TenantDto): void {
56-
abp.message.confirm(
57-
this.l('TenantDeleteWarningMessage', tenant.name),
58-
(result: boolean) => {
59-
if (result) {
60-
this._tenantService
61-
.delete(tenant.id)
37+
list(
38+
request: PagedTenantsRequestDto,
39+
pageNumber: number,
40+
finishedCallback: Function
41+
): void {
42+
this._tenantService
43+
.getAll(request.keyword, request.isActive, request.skipCount, request.maxResultCount)
6244
.pipe(
63-
finalize(() => {
64-
abp.notify.success(this.l('SuccessfullyDeleted'));
65-
this.refresh();
66-
})
45+
finalize(() => {
46+
finishedCallback();
47+
})
6748
)
68-
.subscribe(() => {});
69-
}
70-
}
71-
);
72-
}
49+
.subscribe((result: PagedResultDtoOfTenantDto) => {
50+
this.tenants = result.items;
51+
this.showPaging(result, pageNumber);
52+
});
53+
}
7354

74-
createTenant(): void {
75-
this.showCreateOrEditTenantDialog();
76-
}
55+
delete(tenant: TenantDto): void {
56+
abp.message.confirm(
57+
this.l('TenantDeleteWarningMessage', tenant.name),
58+
(result: boolean) => {
59+
if (result) {
60+
this._tenantService
61+
.delete(tenant.id)
62+
.pipe(
63+
finalize(() => {
64+
abp.notify.success(this.l('SuccessfullyDeleted'));
65+
this.refresh();
66+
})
67+
)
68+
.subscribe(() => { });
69+
}
70+
}
71+
);
72+
}
7773

78-
editTenant(tenant: TenantDto): void {
79-
this.showCreateOrEditTenantDialog(tenant.id);
80-
}
74+
createTenant(): void {
75+
this.showCreateOrEditTenantDialog();
76+
}
8177

82-
showCreateOrEditTenantDialog(id?: number): void {
83-
let createOrEditTenantDialog;
84-
if (id === undefined || id <= 0) {
85-
createOrEditTenantDialog = this._dialog.open(CreateTenantDialogComponent);
86-
} else {
87-
createOrEditTenantDialog = this._dialog.open(EditTenantDialogComponent, {
88-
data: id
89-
});
78+
editTenant(tenant: TenantDto): void {
79+
this.showCreateOrEditTenantDialog(tenant.id);
9080
}
9181

92-
createOrEditTenantDialog.afterClosed().subscribe(result => {
93-
if (result) {
94-
this.refresh();
95-
}
96-
});
97-
}
82+
showCreateOrEditTenantDialog(id?: number): void {
83+
let createOrEditTenantDialog;
84+
if (id === undefined || id <= 0) {
85+
createOrEditTenantDialog = this._dialog.open(CreateTenantDialogComponent);
86+
} else {
87+
createOrEditTenantDialog = this._dialog.open(EditTenantDialogComponent, {
88+
data: id
89+
});
90+
}
91+
92+
createOrEditTenantDialog.afterClosed().subscribe(result => {
93+
if (result) {
94+
this.refresh();
95+
}
96+
});
97+
}
9898
}

0 commit comments

Comments
 (0)