diff --git a/console/src/app/modules/changes/changes.component.html b/console/src/app/modules/changes/changes.component.html index 7495397e94..4908ad05d4 100644 --- a/console/src/app/modules/changes/changes.component.html +++ b/console/src/app/modules/changes/changes.component.html @@ -6,7 +6,7 @@ {{event.changeDate | timestampToDate | localizedDate: 'EEE dd. MMM, HH:mm'}} {{event.editor}} - {{'CHANGES.EVENTS.'+event.eventType | translate}} + {{event?.eventType?.localizedMessage }}
diff --git a/console/src/app/modules/changes/changes.component.ts b/console/src/app/modules/changes/changes.component.ts index 406dbc69e4..2a53b085ce 100644 --- a/console/src/app/modules/changes/changes.component.ts +++ b/console/src/app/modules/changes/changes.component.ts @@ -105,6 +105,7 @@ export class ChangesComponent implements OnInit { return from(col).pipe( tap((res: Changes) => { let values = res.toObject().changesList; + console.log(values); // If prepending, reverse the batch order values = false ? values.reverse() : values; diff --git a/console/src/app/pages/granted-projects/granted-project-grid/granted-project-grid.component.html b/console/src/app/pages/granted-projects/granted-project-grid/granted-project-grid.component.html index 6394556482..144f8bb39a 100644 --- a/console/src/app/pages/granted-projects/granted-project-grid/granted-project-grid.component.html +++ b/console/src/app/pages/granted-projects/granted-project-grid/granted-project-grid.component.html @@ -10,7 +10,7 @@
+ (click)="navigateToProject(item.projectId,item.id, $event)">
{{'PROJECT.PAGES.LASTMODIFIED' | translate}} {{ @@ -34,7 +34,8 @@

{{'PROJECT.PAGES.ALL' | translate}}

-
{{'PROJECT.PAGES.LASTMODIFIED' | translate}} diff --git a/console/src/app/pages/granted-projects/granted-project-grid/granted-project-grid.component.ts b/console/src/app/pages/granted-projects/granted-project-grid/granted-project-grid.component.ts index 0aa1437bfd..a236902237 100644 --- a/console/src/app/pages/granted-projects/granted-project-grid/granted-project-grid.component.ts +++ b/console/src/app/pages/granted-projects/granted-project-grid/granted-project-grid.component.ts @@ -1,6 +1,7 @@ import { animate, animateChild, query, stagger, style, transition, trigger } from '@angular/animations'; import { SelectionModel } from '@angular/cdk/collections'; import { Component, EventEmitter, Input, OnChanges, Output, SimpleChanges } from '@angular/core'; +import { Router } from '@angular/router'; import { ProjectGrantView, ProjectState, ProjectType } from 'src/app/proto/generated/management_pb'; import { AuthService } from 'src/app/services/auth.service'; @@ -40,7 +41,7 @@ export class GrantedProjectGridComponent implements OnChanges { public ProjectState: any = ProjectState; public ProjectType: any = ProjectType; - constructor(private authService: AuthService) { + constructor(private authService: AuthService, private router: Router) { this.selection.changed.subscribe(selection => { this.setPrefixedItem('pinned-granted-projects', JSON.stringify( this.selection.selected.map(item => item.projectId), @@ -97,4 +98,10 @@ export class GrantedProjectGridComponent implements OnChanges { const prefix = (await this.authService.GetActiveOrg()).id; return localStorage.setItem(`${prefix}:${key}`, value); } + + public navigateToProject(projectId: string, id: string, event: any): void { + if (event && event.srcElement && event.srcElement.localName !== 'button') { + this.router.navigate(['/granted-projects', projectId, 'grant', id]); + } + } } diff --git a/console/src/app/pages/home/home.component.html b/console/src/app/pages/home/home.component.html index 91c6a931bb..11245a8408 100644 --- a/console/src/app/pages/home/home.component.html +++ b/console/src/app/pages/home/home.component.html @@ -31,7 +31,7 @@
@@ -59,8 +59,7 @@
@@ -75,7 +74,7 @@
diff --git a/console/src/app/pages/owned-projects/owned-project-detail/owned-project-detail.component.ts b/console/src/app/pages/owned-projects/owned-project-detail/owned-project-detail.component.ts index 2a73e9a77d..22de44aeab 100644 --- a/console/src/app/pages/owned-projects/owned-project-detail/owned-project-detail.component.ts +++ b/console/src/app/pages/owned-projects/owned-project-detail/owned-project-detail.component.ts @@ -82,6 +82,7 @@ export class OwnedProjectDetailComponent implements OnInit, OnDestroy { private async getData({ id }: Params): Promise { this.projectId = id; + console.log(this.projectId); this.orgService.GetIam().then(iam => { this.isZitadel = iam.toObject().iamProjectId === this.projectId; @@ -91,6 +92,7 @@ export class OwnedProjectDetailComponent implements OnInit, OnDestroy { this.projectService.GetProjectById(id).then(proj => { this.project = proj.toObject(); }).catch(error => { + console.error(error); this.toast.showError(error.message); }); } @@ -104,7 +106,11 @@ export class OwnedProjectDetailComponent implements OnInit, OnDestroy { this.toast.showError(error.message); }); } else if (newState === ProjectState.PROJECTSTATE_INACTIVE) { - this.toast.showInfo('You cant update this project.'); + this.projectService.DeactivateProject(this.projectId).then(() => { + this.toast.showInfo('Deactivated Project'); + }).catch(error => { + this.toast.showError(error.message); + }); } } diff --git a/console/src/app/pages/owned-projects/owned-project-grid/owned-project-grid.component.html b/console/src/app/pages/owned-projects/owned-project-grid/owned-project-grid.component.html index 07e44d4a4f..cd76193636 100644 --- a/console/src/app/pages/owned-projects/owned-project-grid/owned-project-grid.component.html +++ b/console/src/app/pages/owned-projects/owned-project-grid/owned-project-grid.component.html @@ -9,7 +9,8 @@

{{'PROJECT.PAGES.PINNED' | translate}}

-
{{'PROJECT.PAGES.LASTMODIFIED' | translate}} @@ -36,7 +37,8 @@

{{'PROJECT.PAGES.ALL' | translate}}

-
{{'PROJECT.PAGES.LASTMODIFIED' | translate}} @@ -64,7 +66,7 @@
add - Add new project + {{'PROJECT.PAGES.ADDNEW' | translate}}
\ No newline at end of file diff --git a/console/src/app/pages/owned-projects/owned-project-grid/owned-project-grid.component.ts b/console/src/app/pages/owned-projects/owned-project-grid/owned-project-grid.component.ts index d5457ec3e3..6f24dd79cc 100644 --- a/console/src/app/pages/owned-projects/owned-project-grid/owned-project-grid.component.ts +++ b/console/src/app/pages/owned-projects/owned-project-grid/owned-project-grid.component.ts @@ -109,4 +109,10 @@ export class OwnedProjectGridComponent implements OnChanges { const prefix = (await this.authService.GetActiveOrg()).id; return localStorage.setItem(`${prefix}:${key}`, value); } + + public navigateToProject(id: string, event: any): void { + if (event && event.srcElement && event.srcElement.localName !== 'button') { + this.router.navigate(['/projects', id]); + } + } } diff --git a/console/src/app/pages/owned-projects/owned-project-list/owned-project-list.component.html b/console/src/app/pages/owned-projects/owned-project-list/owned-project-list.component.html index d15df3c470..58f9eb3140 100644 --- a/console/src/app/pages/owned-projects/owned-project-list/owned-project-list.component.html +++ b/console/src/app/pages/owned-projects/owned-project-list/owned-project-list.component.html @@ -86,7 +86,7 @@ + [routerLink]="['/projects', row.projectId]">