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
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 12 additions and 15 deletions

View File

@ -190,9 +190,7 @@ export class OrgDetailComponent implements OnInit, OnDestroy {
}
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 {

View File

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

View File

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

View File

@ -13,7 +13,6 @@ import { UserGrantContext } from 'src/app/modules/user-grants/user-grants-dataso
import {
Application,
ApplicationSearchResponse,
ProjectGrantState,
ProjectGrantView,
ProjectMember,
ProjectMemberSearchResponse,
@ -162,8 +161,6 @@ export class GrantedProjectDetailComponent implements OnInit, OnDestroy {
}
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 {
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) => {
if (code) {
(this.service as AuthUserService).VerifyMfaOTP(code).then(() => {
// TODO: show state
this.getOTP();
});
}
});