fix(console): mfa refresh after verification, member eventemitter (#651)

* refresh mfa

* fix: detail link from contributors

* lint
This commit is contained in:
Max Peintner
2020-08-27 16:32:03 +02:00
committed by GitHub
parent d233fb6610
commit 3f714679d1
6 changed files with 12 additions and 15 deletions

View File

@@ -190,9 +190,7 @@ export class OrgDetailComponent implements OnInit, OnDestroy {
} }
public showDetail(): void { public showDetail(): void {
if (this.org?.state === OrgState.ORGSTATE_ACTIVE) { this.router.navigate(['org/members']);
this.router.navigate(['org/members']);
}
} }
public verifyDomain(domain: OrgDomainView.AsObject): void { public verifyDomain(domain: OrgDomainView.AsObject): void {

View File

@@ -1,14 +1,14 @@
<app-detail-layout [backRouterLink]="[ '/org']" title="{{org?.name}} {{ 'ORG.MEMBER.TITLE' | translate }}" <app-detail-layout [backRouterLink]="[ '/org']" title="{{org?.name}} {{ 'ORG.MEMBER.TITLE' | translate }}"
description="{{ 'ORG.MEMBER.DESCRIPTION' | translate }}"> description="{{ 'ORG.MEMBER.DESCRIPTION' | translate }}">
<app-refresh-table (refreshed)="refreshPage()" [dataSize]="dataSource.totalResult" <app-refresh-table (refreshed)="refreshPage()" [dataSize]="dataSource?.totalResult"
[timestamp]="dataSource?.viewTimestamp" [selection]="selection" [loading]="dataSource.loading$ | async"> [timestamp]="dataSource?.viewTimestamp" [selection]="selection" [loading]="dataSource?.loading$ | async">
<ng-template appHasRole actions [appHasRole]="['org.member.delete:'+org.id,'org.member.delete']"> <ng-template appHasRole actions [appHasRole]="['org.member.delete:'+org?.id,'org.member.delete']">
<button (click)="removeProjectMemberSelection()" matTooltip="{{'ORG_DETAIL.TABLE.DELETE' | translate}}" <button (click)="removeProjectMemberSelection()" matTooltip="{{'ORG_DETAIL.TABLE.DELETE' | translate}}"
class="icon-button" mat-icon-button *ngIf="selection.hasValue()" color="warn"> class="icon-button" mat-icon-button *ngIf="selection.hasValue()" color="warn">
<i class="las la-trash"></i> <i class="las la-trash"></i>
</button> </button>
</ng-template> </ng-template>
<ng-template appHasRole actions [appHasRole]="['org.member.write:'+org.id,'org.member.write']"> <ng-template appHasRole actions [appHasRole]="['org.member.write:'+org?.id,'org.member.write']">
<a color="primary" [disabled]="disabled" class="add-button" (click)="openAddMember()" color="primary" <a color="primary" [disabled]="disabled" class="add-button" (click)="openAddMember()" color="primary"
mat-raised-button> mat-raised-button>
<mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }} <mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }}

View File

@@ -37,6 +37,10 @@
} }
} }
.add-button {
border-radius: .5rem;
}
.pointer { .pointer {
outline: none; outline: none;
cursor: pointer; cursor: pointer;

View File

@@ -13,7 +13,6 @@ import { UserGrantContext } from 'src/app/modules/user-grants/user-grants-dataso
import { import {
Application, Application,
ApplicationSearchResponse, ApplicationSearchResponse,
ProjectGrantState,
ProjectGrantView, ProjectGrantView,
ProjectMember, ProjectMember,
ProjectMemberSearchResponse, ProjectMemberSearchResponse,
@@ -162,8 +161,6 @@ export class GrantedProjectDetailComponent implements OnInit, OnDestroy {
} }
public showDetail(): void { public showDetail(): void {
if (this.project.state === ProjectGrantState.PROJECTGRANTSTATE_ACTIVE) { this.router.navigate(['granted-projects', this.project.projectId, 'grant', this.grantId, 'members']);
this.router.navigate(['granted-projects', this.project.projectId, 'grant', this.grantId, 'members']);
}
} }
} }

View File

@@ -234,8 +234,6 @@ export class OwnedProjectDetailComponent implements OnInit, OnDestroy {
} }
public showDetail(): void { public showDetail(): void {
if (this.project?.state === ProjectState.PROJECTSTATE_ACTIVE) { this.router.navigate(['projects', this.project.projectId, 'members']);
this.router.navigate(['projects', this.project.projectId, 'members']);
}
} }
} }

View File

@@ -49,7 +49,7 @@ export class AuthUserMfaComponent implements OnInit, OnDestroy {
dialogRef.afterClosed().subscribe((code) => { dialogRef.afterClosed().subscribe((code) => {
if (code) { if (code) {
(this.service as AuthUserService).VerifyMfaOTP(code).then(() => { (this.service as AuthUserService).VerifyMfaOTP(code).then(() => {
// TODO: show state this.getOTP();
}); });
} }
}); });