2020-05-13 14:41:43 +02:00
|
|
|
import { Location } from '@angular/common';
|
|
|
|
|
import { Component, OnInit } from '@angular/core';
|
|
|
|
|
import { Router } from '@angular/router';
|
|
|
|
|
import { Project, ProjectCreateRequest } from 'src/app/proto/generated/management_pb';
|
2020-08-29 10:43:35 +02:00
|
|
|
import { ManagementService } from 'src/app/services/mgmt.service';
|
2020-05-13 14:41:43 +02:00
|
|
|
import { ToastService } from 'src/app/services/toast.service';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-project-create',
|
|
|
|
|
templateUrl: './project-create.component.html',
|
|
|
|
|
styleUrls: ['./project-create.component.scss'],
|
|
|
|
|
})
|
|
|
|
|
export class ProjectCreateComponent implements OnInit {
|
|
|
|
|
public project: ProjectCreateRequest.AsObject = new ProjectCreateRequest().toObject();
|
|
|
|
|
|
|
|
|
|
constructor(
|
|
|
|
|
private router: Router,
|
|
|
|
|
private toast: ToastService,
|
2020-08-29 10:43:35 +02:00
|
|
|
private mgmtService: ManagementService,
|
2020-05-13 14:41:43 +02:00
|
|
|
private _location: Location,
|
|
|
|
|
) { }
|
|
|
|
|
|
|
|
|
|
public createSteps: number = 1;
|
|
|
|
|
public currentCreateStep: number = 1;
|
|
|
|
|
public ngOnInit(): void { }
|
|
|
|
|
|
|
|
|
|
public saveProject(): void {
|
2020-08-29 10:43:35 +02:00
|
|
|
this.mgmtService
|
2020-05-13 14:41:43 +02:00
|
|
|
.CreateProject(this.project)
|
|
|
|
|
.then((data: Project) => {
|
|
|
|
|
this.router.navigate(['projects', data.getId()]);
|
|
|
|
|
})
|
fix(console): cleanup structure, role guard, paginated requests, cleanup policies, toast i18n, view timestamp, preloading strategy, maennchenfindings, fix passwordchange (#483)
* routes, move grid to list comopnent
* rename app list component, move to project sub
* add owned-project-detail child module
* seperate pipes
* set password validators only if needed
* create org initialize without pwd
* no caps
* self xss message
* fix user table
* fix project member paginator
* fix project members pagination, user grant pag
* move project grants, fix imports
* fix owned project detail imports
* use pipe and directives
* ng content bindings, rem custom schemas
* i18n, fix error toast parameter
* toast i18n
* side background
* fix: sequence, add timestamp
* audit
* fix metanav background
* org domain label
* cleanup policy component
* shorten user grant roles, mk cols visible as bind
* move user components, show otp only if available
* preload modules
* fix password change
* fix org create buttons
* class css
2020-07-16 15:13:36 +02:00
|
|
|
.catch(error => {
|
|
|
|
|
this.toast.showError(error);
|
2020-05-13 14:41:43 +02:00
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public close(): void {
|
|
|
|
|
this._location.back();
|
|
|
|
|
}
|
|
|
|
|
}
|