fix: console eventstore (#1476)

* fix org switch

* user grants

* fix project grants, user grant update

* fix idp removal, prettier buttons, attribute names
This commit is contained in:
Max Peintner
2021-03-25 15:47:56 +01:00
committed by GitHub
parent 4d10f3e715
commit ae66e40ace
19 changed files with 59 additions and 64 deletions
@@ -6,7 +6,8 @@
</div>
<ng-template appHasRole [appHasRole]="['iam.write']">
<mat-slide-toggle class="example-margin" color="primary" (change)="changeSelf($event)" [(ngModel)]="forSelf">
<mat-slide-toggle [disabled]="currentCreateStep != 1" class="example-margin" color="primary"
(change)="changeSelf($event)" [(ngModel)]="forSelf">
Use your personal account as organisation owner
</mat-slide-toggle>
@@ -5,6 +5,7 @@ h1 {
.sub {
color: var(--grey);
margin-bottom: 2rem;
font-size: 14px;
}
.max-width-container {
@@ -35,22 +35,22 @@
<ng-container matColumnDef="grantedOrgName">
<th mat-header-cell *matHeaderCellDef> {{ 'PROJECT.GRANT.GRANTEDORG' | translate }} </th>
<td [routerLink]="['/projects',grant.projectId,'grant', grant.id]" class="pointer" mat-cell
<td [routerLink]="['/projects',grant.projectId,'grant', grant.grantId]" class="pointer" mat-cell
*matCellDef="let grant">
{{grant.grantedOrgName}} </td>
</ng-container>
<ng-container matColumnDef="dates">
<th mat-header-cell *matHeaderCellDef> {{ 'PROJECT.GRANT.DATES' | translate }} </th>
<td [routerLink]="['/projects',grant.projectId,'grant', grant.id]" class="pointer" mat-cell
<td [routerLink]="['/projects',grant.projectId,'grant', grant.grantId]" class="pointer" mat-cell
*matCellDef="let grant">
<div class="date-block">
<span class="date-sub">{{ 'PROJECT.GRANT.CREATIONDATE' | translate }}:</span>
<span>{{grant.creationDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }}</span>
<span>{{grant.details.creationDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }}</span>
</div>
<div class="date-block">
<span class="date-sub">{{ 'PROJECT.GRANT.CHANGEDATE' | translate }}</span>
<span>{{grant.changeDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }}</span>
<span>{{grant.details.changeDate | timestampToDate | localizedDate: 'dd. MMM, HH:mm' }}</span>
</div>
</ng-container>
@@ -5,6 +5,7 @@ h1 {
.sub {
color: var(--grey);
margin-bottom: 2rem;
font-size: 14px;
}
.max-width-container {
@@ -106,7 +106,7 @@ export class ProjectGrantDetailComponent {
updateRoles(selectionChange: MatSelectChange): void {
this.mgmtService.updateProjectGrant(this.grant.grantId, this.grant.projectId, selectionChange.value)
.then(() => {
this.toast.showInfo('PROJECT.TOAST.GRANTUPDATED');
this.toast.showInfo('PROJECT.GRANT.TOAST.PROJECTGRANTUPDATED', true);
}).catch(error => {
this.toast.showError(error);
});
@@ -19,7 +19,7 @@
<ng-container matColumnDef="idpConfigId">
<th mat-header-cell *matHeaderCellDef> {{ 'USER.EXTERNALIDP.IDPCONFIGID' | translate }} </th>
<td mat-cell *matCellDef="let idp"> {{idp?.idpConfigId}} </td>
<td mat-cell *matCellDef="let idp"> {{idp?.idpId}} </td>
</ng-container>
<ng-container matColumnDef="idpName">
@@ -52,6 +52,7 @@ export class UserDetailComponent implements OnInit {
this.mgmtUserService.getUserByID(id).then(resp => {
if (resp.user) {
this.user = resp.user;
console.log(this.user);
}
}).catch(err => {
console.error(err);
@@ -158,6 +159,7 @@ export class UserDetailComponent implements OnInit {
this.mgmtUserService.updateHumanEmail(this.user.id, email).then(() => {
this.toast.showInfo('USER.TOAST.EMAILSAVED', true);
if (this.user.state == UserState.USER_STATE_INITIAL) {
console.log('init');
this.mgmtUserService.resendHumanInitialization(this.user.id, email ?? '').then(() => {
this.toast.showInfo('USER.TOAST.INITEMAILSENT', true);
this.refreshChanges$.emit();