mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-30 02:52:16 +00:00
fix(console): refactoring (#197)
* return error from changes * project member context, org-policies, state * project type seperation * chore(deps): bump grpc from 1.24.2 to 1.24.3 in /console (#183) Bumps [grpc](https://github.com/grpc/grpc-node) from 1.24.2 to 1.24.3. - [Release notes](https://github.com/grpc/grpc-node/releases) - [Commits](https://github.com/grpc/grpc-node/compare/[email protected]@1.24.3) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump google-proto-files from 1.1.2 to 2.1.0 in /console (#176) Bumps [google-proto-files](https://github.com/googleapis/nodejs-proto-files) from 1.1.2 to 2.1.0. - [Release notes](https://github.com/googleapis/nodejs-proto-files/releases) - [Changelog](https://github.com/googleapis/nodejs-proto-files/blob/master/CHANGELOG.md) - [Commits](https://github.com/googleapis/nodejs-proto-files/compare/v1.1.2...v2.1.0) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump karma-coverage-istanbul-reporter in /console (#169) Bumps [karma-coverage-istanbul-reporter](https://github.com/mattlewis92/karma-coverage-istanbul-reporter) from 3.0.2 to 3.0.3. - [Release notes](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/releases) - [Changelog](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/blob/master/CHANGELOG.md) - [Commits](https://github.com/mattlewis92/karma-coverage-istanbul-reporter/compare/v3.0.2...v3.0.3) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update packages * update deps * lint * replace assets * add key, creationdate for roles * project grant members Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
parent
e0fb19b4e9
commit
2d369fbcd3
@@ -32,12 +32,12 @@ import { ToastService } from 'src/app/services/toast.service';
|
||||
],
|
||||
})
|
||||
export class ProjectGridComponent {
|
||||
@Input() items: Array<Project.AsObject> = [];
|
||||
@Input() items: Array<GrantedProject.AsObject> = [];
|
||||
@Output() newClicked: EventEmitter<boolean> = new EventEmitter();
|
||||
@Output() changedView: EventEmitter<boolean> = new EventEmitter();
|
||||
@Input() loading: boolean = false;
|
||||
|
||||
public selection: SelectionModel<Project.AsObject> = new SelectionModel<Project.AsObject>(true, []);
|
||||
public selection: SelectionModel<GrantedProject.AsObject> = new SelectionModel<GrantedProject.AsObject>(true, []);
|
||||
public selectedIndex: number = -1;
|
||||
|
||||
public showNewProject: boolean = false;
|
||||
@@ -48,41 +48,25 @@ export class ProjectGridComponent {
|
||||
public selectItem(item: GrantedProject.AsObject, event?: any): void {
|
||||
if (event && !event.target.classList.contains('mat-icon')) {
|
||||
if (item.grantId) {
|
||||
this.router.navigate(['/project-grant', `${item.id}:${item.grantId}`]);
|
||||
this.router.navigate([item.id, '/grant', `${item.grantId}`]);
|
||||
} else {
|
||||
this.router.navigate(['/projects', item.id]);
|
||||
}
|
||||
} else if (!event) {
|
||||
this.router.navigate(['/projects', item.id]);
|
||||
if (item.grantId) {
|
||||
this.router.navigate([item.id, '/grant', `${item.grantId}`]);
|
||||
} else {
|
||||
this.router.navigate(['/projects', item.id]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
public addItem(): void {
|
||||
this.newClicked.emit(true);
|
||||
}
|
||||
|
||||
public deleteProjects(selected: Project.AsObject[]): void {
|
||||
// TODO: implement service
|
||||
|
||||
// Promise.all([selected.map(proj => {
|
||||
// return this.projectService.DeleteProject(proj.id);
|
||||
// })]).then(() => {
|
||||
// this.toast.showInfo('Successful deleted all projects');
|
||||
// }).catch(error => {
|
||||
// this.toast.showError(error.message);
|
||||
// });
|
||||
}
|
||||
|
||||
public deleteProject(proj: Project.AsObject): void {
|
||||
// TODO: implement service
|
||||
|
||||
// this.projectService.DeleteProject(proj.id).then(() => {
|
||||
// this.toast.showInfo('Successful deleted Project');
|
||||
// }).catch(error => {
|
||||
// this.toast.showError(error.message);
|
||||
// });
|
||||
}
|
||||
|
||||
public dateFromTimestamp(date: Timestamp.AsObject): any {
|
||||
const ts: Date = new Date(date.seconds * 1000 + date.nanos / 1000);
|
||||
return ts;
|
||||
|
||||
Reference in New Issue
Block a user