Merge remote-tracking branch 'origin/develop' into on-push-strategy
This commit is contained in:
commit
cdfced0dd8
|
@ -44,7 +44,9 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
@Input()
|
||||
public id: string;
|
||||
@Input()
|
||||
public type: string;
|
||||
set type(type: string) {
|
||||
this._type = Role.mapType(type);
|
||||
}
|
||||
@Input()
|
||||
public name: string;
|
||||
@Input()
|
||||
|
@ -90,6 +92,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
@ViewChild('deletePendingModal') deletePendingModal: AlertModal;
|
||||
@ViewChild('createRoleModal') createRoleModal: AlertModal;
|
||||
public stakeholderUtils: StakeholderUtils = new StakeholderUtils();
|
||||
private _type: string;
|
||||
|
||||
constructor(private userRegistryService: UserRegistryService,
|
||||
private userManagementService: UserManagementService,
|
||||
|
@ -143,7 +146,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
updateLists() {
|
||||
this.loadActive = true;
|
||||
this.loadPending = true;
|
||||
this.subs.push(this.userRegistryService.getActive(this.type, this.id, this.role, true).subscribe(users => {
|
||||
this.subs.push(this.userRegistryService.getActive(this._type, this.id, this.role, true).subscribe(users => {
|
||||
this.active = users;
|
||||
this.filterActiveBySearch(this.filterForm.value.active);
|
||||
this.loadActive = false;
|
||||
|
@ -156,7 +159,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
}
|
||||
this.loadActive = false;
|
||||
}));
|
||||
this.subs.push(this.userRegistryService.getPending(this.type, this.id, this.role, true).subscribe(users => {
|
||||
this.subs.push(this.userRegistryService.getPending(this._type, this.id, this.role, true).subscribe(users => {
|
||||
this.pending = users;
|
||||
this.filterPendingBySearch(this.filterForm.value.pending);
|
||||
this.loadPending = false;
|
||||
|
@ -208,8 +211,8 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
this.createRoleModal.okButtonLeft = false;
|
||||
this.createRoleModal.okButtonText = 'Create';
|
||||
this.roleFb = this.fb.group({
|
||||
name: this.fb.control(Role.roleName(this.type, this.id), Validators.required),
|
||||
description: this.fb.control(Role.roleName(this.type, this.id), Validators.required)
|
||||
name: this.fb.control(Role.roleName(this._type, this.id), Validators.required),
|
||||
description: this.fb.control(Role.roleName(this._type, this.id), Validators.required)
|
||||
});
|
||||
setTimeout(() => {
|
||||
this.roleFb.get('name').disable();
|
||||
|
@ -220,7 +223,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
|
||||
deleteActive() {
|
||||
this.loadActive = true;
|
||||
this.subs.push(this.userRegistryService.remove(this.type, this.id, this.selectedUser, this.role).subscribe(() => {
|
||||
this.subs.push(this.userRegistryService.remove(this._type, this.id, this.selectedUser, this.role).subscribe(() => {
|
||||
this.active = this.active.filter(user => user.email != this.selectedUser);
|
||||
if (this.currentActivePage.length === 0) {
|
||||
this.activePage = 1;
|
||||
|
@ -238,7 +241,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
|
||||
deletePending() {
|
||||
this.loadPending = true;
|
||||
this.subs.push(this.userRegistryService.cancelInvitation(this.type, this.id, this.selectedUser, this.role).subscribe(() => {
|
||||
this.subs.push(this.userRegistryService.cancelInvitation(this._type, this.id, this.selectedUser, this.role).subscribe(() => {
|
||||
this.pending = this.pending.filter(user => user != this.selectedUser);
|
||||
this.filterPendingBySearch(this.filterForm.value.pending);
|
||||
if (this.currentPendingPage.length === 0) {
|
||||
|
@ -265,7 +268,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
let current = null;
|
||||
let invitations = (<Array<any>>this.emailsForm.value).map(email => {
|
||||
current = email;
|
||||
return this.userRegistryService.invite(this.type, this.id, {
|
||||
return this.userRegistryService.invite(this._type, this.id, {
|
||||
link: this.link,
|
||||
email: this.emailComposer(this.name, email, this.role)
|
||||
}, this.role).pipe(catchError(error => {
|
||||
|
@ -308,7 +311,7 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
createGroup() {
|
||||
this.loadActive = true;
|
||||
this.loadPending = true;
|
||||
this.userRegistryService.createRole(this.type, this.id).subscribe(() => {
|
||||
this.userRegistryService.createRole(this._type, this.id).subscribe(() => {
|
||||
NotificationHandler.rise('Group has been <b> successfully created</b>');
|
||||
this.updateLists();
|
||||
}, error => {
|
||||
|
@ -336,11 +339,11 @@ export class RoleUsersComponent implements OnInit, OnDestroy, OnChanges {
|
|||
}
|
||||
|
||||
public get isManager(): boolean {
|
||||
return this.isCurator || !!Session.isManager(this.type, this.id, this.user);
|
||||
return this.isCurator || !!Session.isManager(this._type, this.id, this.user);
|
||||
}
|
||||
|
||||
public get isCurator(): boolean {
|
||||
return this.isPortalAdmin || !!Session.isCurator(this.type, this.user);
|
||||
return this.isPortalAdmin || !!Session.isCurator(this._type, this.user);
|
||||
}
|
||||
|
||||
public get isPortalAdmin(): boolean {
|
||||
|
|
|
@ -73,7 +73,7 @@ export class RoleVerificationComponent extends BaseComponent implements OnInit,
|
|||
public id: string;
|
||||
@Input()
|
||||
set type(type: string) {
|
||||
this._type = Role.GROUP + type;
|
||||
this._type = Role.GROUP + Role.mapType(type);
|
||||
}
|
||||
@Input()
|
||||
public name: string;
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
<ng-container *ngFor="let customFilter of customFilters">
|
||||
<ng-container *ngIf="customFilter.isHiddenFilter">
|
||||
<li class="uk-flex uk-flex-middle">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-search-filter uk-text-truncate target1">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-secondary uk-text-truncate target1">
|
||||
{{customFilter.valueName}}
|
||||
</span>
|
||||
</li>
|
||||
|
@ -15,7 +15,7 @@
|
|||
<ng-container *ngFor="let type of resultTypes.values; let i = index;">
|
||||
<ng-container *ngIf="type.selected">
|
||||
<li class="">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-search-filter uk-flex uk-flex-middle target2">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-secondary uk-flex uk-flex-middle target2">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">{{type.name}}</span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeResultType(type.id)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
|
@ -29,7 +29,7 @@
|
|||
<ng-container *ngFor="let filter of rangeFilters ">
|
||||
<ng-container *ngIf="filter.selectedFromAndToValues">
|
||||
<li class="">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-search-filter uk-flex uk-flex-middle target3">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-secondary uk-flex uk-flex-middle target3">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">{{filter.selectedFromAndToValues}}</span>
|
||||
<button [class.uk-disabled]="disabled" (click)="removeRangeFilter(filter)" class="uk-close uk-icon" [disabled]="disabled">
|
||||
<icon name="close" flex="true" ratio="0.7"></icon>
|
||||
|
@ -44,7 +44,7 @@
|
|||
<ng-container *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; ">
|
||||
<li *ngIf="!customFilter || (customFilter.isHiddenFilter && customFilter.valueId != value.id)"
|
||||
class="">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-search-filter uk-flex uk-flex-middle target4">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-secondary uk-flex uk-flex-middle target4">
|
||||
<span
|
||||
class="uk-margin-small-right uk-width-expand uk-text-truncate">
|
||||
<ng-container *ngIf="filter.type && (filter.type == 'boolean' || filter.type == 'triplet') else noboolean">
|
||||
|
@ -73,7 +73,7 @@
|
|||
<ng-container *ngIf="filter.countSelectedValues > 0">
|
||||
<ng-container *ngFor="let value of getSelectedValues(filter); let i = index; let end = last; ">
|
||||
<li *ngIf="!customFilters || (customFilters[0].isHiddenFilter && customFilters[0].valueId != value.id)">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-search-filter uk-flex uk-flex-middle target5">
|
||||
<span class="uk-text-capitalize uk-label uk-label-small uk-label-secondary uk-flex uk-flex-middle target5">
|
||||
<span class="uk-margin-small-right uk-width-expand uk-text-truncate">
|
||||
<ng-container *ngIf="filter.type && (filter.type == 'boolean' || filter.type == 'triplet') else noboolean">
|
||||
<span>{{filter.title}}:
|
||||
|
|
Loading…
Reference in New Issue