mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-06 06:12:16 +00:00
* cli, core * cli, core * material, cdk * chore(deps-dev): bump @types/node from 18.13.0 to 18.15.11 in /console (#5594) Bumps [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) from 18.13.0 to 18.15.11. - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump jasmine-core from 4.5.0 to 4.6.0 in /console (#5592) Bumps [jasmine-core](https://github.com/jasmine/jasmine) from 4.5.0 to 4.6.0. - [Release notes](https://github.com/jasmine/jasmine/releases) - [Changelog](https://github.com/jasmine/jasmine/blob/main/RELEASE.md) - [Commits](https://github.com/jasmine/jasmine/compare/v4.5.0...v4.6.0) --- updated-dependencies: - dependency-name: jasmine-core dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps): bump zone.js from 0.12.0 to 0.13.0 in /console (#5586) Bumps [zone.js](https://github.com/angular/angular/tree/HEAD/packages/zone.js) from 0.12.0 to 0.13.0. - [Release notes](https://github.com/angular/angular/releases) - [Changelog](https://github.com/angular/angular/blob/main/packages/zone.js/CHANGELOG.md) - [Commits](https://github.com/angular/angular/commits/zone.js-0.13.0/packages/zone.js) --- updated-dependencies: - dependency-name: zone.js dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * chore(deps-dev): bump prettier from 2.8.4 to 2.8.7 in /console (#5589) Bumps [prettier](https://github.com/prettier/prettier) from 2.8.4 to 2.8.7. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.8.4...2.8.7) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * lock * tsconfig, index signature, angular.json * cli core * material cdk * chore(deps): bump libphonenumber-js from 1.10.19 to 1.10.24 in /console (#5498) Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.10.19 to 1.10.24. - [Release notes](https://gitlab.com/catamphetamine/libphonenumber-js/tags) - [Changelog](https://gitlab.com/catamphetamine/libphonenumber-js/blob/master/CHANGELOG.md) - [Commits](https://gitlab.com/catamphetamine/libphonenumber-js/compare/v1.10.19...v1.10.24) --- updated-dependencies: - dependency-name: libphonenumber-js dependency-type: direct:production update-type: version-update:semver-patch ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * update packages * rm redundant bindings * disable button * rm provider service * rm environment.tss * seo * fresh lock * eslint * eslint * increase budgets --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
63 lines
2.1 KiB
TypeScript
63 lines
2.1 KiB
TypeScript
import { Component } from '@angular/core';
|
|
import { ActivatedRoute, Params, Router } from '@angular/router';
|
|
import { BehaviorSubject, take } from 'rxjs';
|
|
import { ProjectType } from 'src/app/modules/project-members/project-members-datasource';
|
|
import { Breadcrumb, BreadcrumbService, BreadcrumbType } from 'src/app/services/breadcrumb.service';
|
|
import { ManagementService } from 'src/app/services/mgmt.service';
|
|
|
|
@Component({
|
|
selector: 'cnsl-projects',
|
|
templateUrl: './projects.component.html',
|
|
styleUrls: ['./projects.component.scss'],
|
|
})
|
|
export class ProjectsComponent {
|
|
public zitadelProjectId: string = '';
|
|
public projectType$: BehaviorSubject<any> = new BehaviorSubject(ProjectType.PROJECTTYPE_OWNED);
|
|
public projectType: ProjectType = ProjectType.PROJECTTYPE_OWNED;
|
|
public ProjectType: any = ProjectType;
|
|
public grid: boolean = true;
|
|
constructor(
|
|
private route: ActivatedRoute,
|
|
private router: Router,
|
|
private activatedRoute: ActivatedRoute,
|
|
public mgmtService: ManagementService,
|
|
breadcrumbService: BreadcrumbService,
|
|
) {
|
|
this.activatedRoute.queryParams.pipe(take(1)).subscribe((params: Params) => {
|
|
const type = params['type'];
|
|
if (type && type === 'owned') {
|
|
this.setType(ProjectType.PROJECTTYPE_OWNED);
|
|
} else if (type && type === 'granted') {
|
|
this.setType(ProjectType.PROJECTTYPE_GRANTED);
|
|
}
|
|
});
|
|
mgmtService.getIAM().then((iam) => {
|
|
this.zitadelProjectId = iam.iamProjectId;
|
|
});
|
|
|
|
const bread: Breadcrumb = {
|
|
type: BreadcrumbType.ORG,
|
|
routerLink: ['/org'],
|
|
};
|
|
breadcrumbService.setBreadcrumb([bread]);
|
|
}
|
|
|
|
public addProject(): void {
|
|
this.router.navigate(['/projects', 'create']);
|
|
}
|
|
|
|
public setType(type: ProjectType) {
|
|
this.projectType$.next(type);
|
|
this.router.navigate([], {
|
|
relativeTo: this.route,
|
|
queryParams: {
|
|
type:
|
|
type === ProjectType.PROJECTTYPE_OWNED ? 'owned' : type === ProjectType.PROJECTTYPE_GRANTED ? 'granted' : 'owned',
|
|
},
|
|
replaceUrl: true,
|
|
queryParamsHandling: 'merge',
|
|
skipLocationChange: false,
|
|
});
|
|
}
|
|
}
|