Browse Source
Merge pull request #1595 from abpframework/feature/generalize-button-component
Feature/generalize button component
pull/1600/head
Yasin Aydın
7 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with
48 additions and
42 deletions
-
npm/ng-packs/packages/identity/src/lib/components/roles/roles.component.html
-
npm/ng-packs/packages/identity/src/lib/components/users/users.component.html
-
npm/ng-packs/packages/identity/src/lib/services/identity.service.ts
-
npm/ng-packs/packages/permission-management/src/lib/components/permission-management.component.html
-
npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.html
-
npm/ng-packs/packages/tenant-management/src/lib/components/tenants/tenants.component.ts
-
npm/ng-packs/packages/tenant-management/src/lib/services/tenant-management.service.ts
-
npm/ng-packs/packages/theme-basic/src/lib/components/change-password/change-password.component.html
-
npm/ng-packs/packages/theme-basic/src/lib/components/profile/profile.component.html
|
|
|
@ -100,9 +100,13 @@ |
|
|
|
<button type="button" class="btn btn-secondary" #abpClose> |
|
|
|
{{ 'AbpIdentity::Cancel' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button type="button" class="btn btn-primary" (click)="save()"> |
|
|
|
<i class="fa fa-check mr-1"></i> <span>{{ 'AbpIdentity::Save' | abpLocalization }}</span> |
|
|
|
</button> |
|
|
|
<abp-button |
|
|
|
[requestType]="['POST', 'PUT']" |
|
|
|
requestURLContainSearchValue="roles" |
|
|
|
iconClass="fa fa-check" |
|
|
|
(click)="save()" |
|
|
|
>{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button |
|
|
|
> |
|
|
|
</ng-template> |
|
|
|
</abp-modal> |
|
|
|
|
|
|
|
|
|
|
|
@ -84,7 +84,7 @@ |
|
|
|
|
|
|
|
<ng-template #abpBody> |
|
|
|
<perfect-scrollbar class="ps-show-always" style="max-height: 70vh;"> |
|
|
|
<form [formGroup]="form"> |
|
|
|
<form [formGroup]="form" validateOnSubmit> |
|
|
|
<ngb-tabset> |
|
|
|
<ngb-tab [title]="'AbpIdentity::UserInformations' | abpLocalization"> |
|
|
|
<ng-template ngbTabContent> |
|
|
|
@ -183,9 +183,13 @@ |
|
|
|
<button type="button" class="btn btn-secondary" #abpClose> |
|
|
|
{{ 'AbpIdentity::Cancel' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button type="button" class="btn btn-primary" (click)="save()"> |
|
|
|
<i class="fa fa-check mr-1"></i> <span>{{ 'AbpIdentity::Save' | abpLocalization }}</span> |
|
|
|
</button> |
|
|
|
<abp-button |
|
|
|
[requestType]="['POST', 'PUT']" |
|
|
|
requestURLContainSearchValue="users" |
|
|
|
iconClass="fa fa-check" |
|
|
|
(click)="save()" |
|
|
|
>{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button |
|
|
|
> |
|
|
|
</ng-template> |
|
|
|
</abp-modal> |
|
|
|
|
|
|
|
|
|
|
|
@ -108,7 +108,7 @@ export class IdentityService { |
|
|
|
} |
|
|
|
|
|
|
|
updateUser(body: Identity.UserItem): Observable<Identity.UserItem> { |
|
|
|
const url = `/identity/users/${body.id}`; |
|
|
|
const url = `/api/identity/users/${body.id}`; |
|
|
|
delete body.id; |
|
|
|
|
|
|
|
const request: Rest.Request<Identity.UserItem> = { |
|
|
|
|
|
|
|
@ -82,9 +82,13 @@ |
|
|
|
<button type="button" class="btn btn-secondary" #abpClose> |
|
|
|
{{ 'AbpIdentity::Cancel' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button type="submit" class="btn btn-primary" (click)="onSubmit()"> |
|
|
|
<i class="fa fa-check mr-1"></i> <span>{{ 'AbpIdentity::Save' | abpLocalization }}</span> |
|
|
|
</button> |
|
|
|
<abp-button |
|
|
|
[requestType]="['PUT']" |
|
|
|
requestURLContainSearchValue="permissions" |
|
|
|
iconClass="fa fa-check" |
|
|
|
(click)="onSubmit()" |
|
|
|
>{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button |
|
|
|
> |
|
|
|
</ng-template> |
|
|
|
</ng-container> |
|
|
|
</abp-modal> |
|
|
|
|
|
|
|
@ -73,13 +73,6 @@ |
|
|
|
> |
|
|
|
{{ 'AbpTenantManagement::ConnectionStrings' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button |
|
|
|
[abpPermission]="'AbpTenantManagement.Tenants.ManageFeatures'" |
|
|
|
ngbDropdownItem |
|
|
|
(click)="onManageFeatures(data.id)" |
|
|
|
> |
|
|
|
{{ 'AbpTenantManagement::Features' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button |
|
|
|
[abpPermission]="'AbpTenantManagement.Tenants.Delete'" |
|
|
|
ngbDropdownItem |
|
|
|
@ -110,9 +103,13 @@ |
|
|
|
<button #abpClose type="button" class="btn btn-secondary"> |
|
|
|
{{ 'AbpTenantManagement::Cancel' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button class="btn btn-primary" type="button" (click)="save()"> |
|
|
|
{{ 'AbpTenantManagement::Save' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<abp-button |
|
|
|
[requestType]="['POST', 'PUT', 'DELETE']" |
|
|
|
requestURLContainSearchValue="change-password" |
|
|
|
iconClass="fa fa-check" |
|
|
|
(click)="save()" |
|
|
|
>{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button |
|
|
|
> |
|
|
|
</ng-template> |
|
|
|
</abp-modal> |
|
|
|
|
|
|
|
@ -158,7 +155,3 @@ |
|
|
|
</div> |
|
|
|
</form> |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
<ng-template #featuresModalTemplate> |
|
|
|
Manage Features |
|
|
|
</ng-template> |
|
|
|
|
|
|
|
@ -68,9 +68,6 @@ export class TenantsComponent implements OnInit { |
|
|
|
@ViewChild('connectionStringModalTemplate', { static: false }) |
|
|
|
connectionStringModalTemplate: TemplateRef<any>; |
|
|
|
|
|
|
|
@ViewChild('featuresModalTemplate', { static: false }) |
|
|
|
featuresModalTemplate: TemplateRef<any>; |
|
|
|
|
|
|
|
constructor( |
|
|
|
private confirmationService: ConfirmationService, |
|
|
|
private tenantService: TenantManagementService, |
|
|
|
@ -126,10 +123,6 @@ export class TenantsComponent implements OnInit { |
|
|
|
}); |
|
|
|
} |
|
|
|
|
|
|
|
onManageFeatures(id: string) { |
|
|
|
this.openModal('AbpTenantManagement::Features', this.featuresModalTemplate, 'saveFeatures'); |
|
|
|
} |
|
|
|
|
|
|
|
onAddTenant() { |
|
|
|
this.selected = {} as ABP.BasicItem; |
|
|
|
this.createTenantForm(); |
|
|
|
|
|
|
|
@ -61,7 +61,7 @@ export class TenantManagementService { |
|
|
|
} |
|
|
|
|
|
|
|
getDefaultConnectionString(id: string): Observable<string> { |
|
|
|
const url = `/api/multi-tenancy/tenants/${id}/defaultConnectionString`; |
|
|
|
const url = `/api/multi-tenancy/tenants/${id}/default-connection-string`; |
|
|
|
|
|
|
|
const request: Rest.Request<TenantManagement.DefaultConnectionStringRequest> = { |
|
|
|
method: 'GET', |
|
|
|
@ -72,7 +72,7 @@ export class TenantManagementService { |
|
|
|
} |
|
|
|
|
|
|
|
updateDefaultConnectionString(payload: TenantManagement.DefaultConnectionStringRequest): Observable<any> { |
|
|
|
const url = `/api/multi-tenancy/tenants/${payload.id}/defaultConnectionString`; |
|
|
|
const url = `/api/multi-tenancy/tenants/${payload.id}/default-connection-string`; |
|
|
|
|
|
|
|
const request: Rest.Request<TenantManagement.DefaultConnectionStringRequest> = { |
|
|
|
method: 'PUT', |
|
|
|
@ -83,7 +83,7 @@ export class TenantManagementService { |
|
|
|
} |
|
|
|
|
|
|
|
deleteDefaultConnectionString(id: string): Observable<string> { |
|
|
|
const url = `/api/multi-tenancy/tenant/${id}/defaultConnectionString`; |
|
|
|
const url = `/api/multi-tenancy/tenant/${id}/default-connection-string`; |
|
|
|
|
|
|
|
const request: Rest.Request<TenantManagement.DefaultConnectionStringRequest> = { |
|
|
|
method: 'DELETE', |
|
|
|
|
|
|
|
@ -27,8 +27,12 @@ |
|
|
|
<button type="button" class="btn btn-secondary" #abpClose> |
|
|
|
{{ 'AbpIdentity::Cancel' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button type="button" class="btn btn-primary" (click)="onSubmit()"> |
|
|
|
<i class="fa fa-check mr-1"></i> <span>{{ 'AbpIdentity::Save' | abpLocalization }}</span> |
|
|
|
</button> |
|
|
|
<abp-button |
|
|
|
[requestType]="['POST']" |
|
|
|
requestURLContainSearchValue="change-password" |
|
|
|
iconClass="fa fa-check" |
|
|
|
(click)="onSubmit()" |
|
|
|
>{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button |
|
|
|
> |
|
|
|
</ng-template> |
|
|
|
</abp-modal> |
|
|
|
|
|
|
|
@ -6,7 +6,7 @@ |
|
|
|
<form *ngIf="form" [formGroup]="form" novalidate> |
|
|
|
<div class="form-group"> |
|
|
|
<label for="username">{{ 'AbpIdentity::DisplayName:UserName' | abpLocalization }}</label |
|
|
|
><span> * </span><input type="text" id="username" class="form-control" formControlName="userName" autofocus/> |
|
|
|
><span> * </span><input type="text" id="username" class="form-control" formControlName="userName" autofocus /> |
|
|
|
</div> |
|
|
|
<div class="row"> |
|
|
|
<div class="col col-md-6"> |
|
|
|
@ -36,8 +36,12 @@ |
|
|
|
<button #abpClose type="button" class="btn btn-secondary"> |
|
|
|
{{ 'AbpIdentity::Cancel' | abpLocalization }} |
|
|
|
</button> |
|
|
|
<button type="button" class="btn btn-primary" (click)="onSubmit()"> |
|
|
|
<i class="fa fa-check mr-1"></i> <span>{{ 'AbpIdentity::Save' | abpLocalization }}</span> |
|
|
|
</button> |
|
|
|
<abp-button |
|
|
|
[requestType]="['PUT']" |
|
|
|
requestURLContainSearchValue="my-profile" |
|
|
|
iconClass="fa fa-check" |
|
|
|
(click)="onSubmit()" |
|
|
|
>{{ 'AbpIdentity::Save' | abpLocalization }}</abp-button |
|
|
|
> |
|
|
|
</ng-template> |
|
|
|
</abp-modal> |
|
|
|
|