mirror of
https://github.com/zitadel/zitadel.git
synced 2025-12-13 01:49:23 +00:00
fix(console): granted project member actions (create, update, delete) (#438)
* project grant members abst * ref name from both project types
This commit is contained in:
@@ -33,9 +33,9 @@
|
||||
|
||||
<mat-tab-group mat-stretch-tabs class="tab-group" disablePagination="true">
|
||||
<mat-tab label="Details">
|
||||
<app-project-contributors *ngIf="project"
|
||||
<app-project-contributors *ngIf="project && grantId"
|
||||
[disabled]="project?.state !== ProjectState.PROJECTSTATE_ACTIVE"
|
||||
[projectType]="ProjectType.PROJECTTYPE_GRANTED" [project]="project">
|
||||
[projectType]="ProjectType.PROJECTTYPE_GRANTED" [project]="project" [grantId]="grantId">
|
||||
</app-project-contributors>
|
||||
</mat-tab>
|
||||
<mat-tab label="{{ 'CHANGES.PROJECT.TITLE' | translate }}" class="flex-col">
|
||||
|
||||
@@ -22,7 +22,7 @@ const routes: Routes = [
|
||||
},
|
||||
},
|
||||
{
|
||||
path: ':projectid/members',
|
||||
path: ':projectid/grant/:grantid/members',
|
||||
data: {
|
||||
type: ProjectType.PROJECTTYPE_GRANTED,
|
||||
},
|
||||
|
||||
@@ -126,19 +126,19 @@ export class ProjectGrantMembersComponent implements AfterViewInit, OnInit {
|
||||
|
||||
dialogRef.afterClosed().subscribe((dataToAdd: ProjectGrantMembersCreateDialogExportType) => {
|
||||
if (dataToAdd) {
|
||||
dataToAdd.userIds.forEach((userid: string) => {
|
||||
this.projectService.AddProjectGrantMember(
|
||||
Promise.all(dataToAdd.userIds.map((userid: string) => {
|
||||
return this.projectService.AddProjectGrantMember(
|
||||
this.projectId,
|
||||
this.grantId,
|
||||
userid,
|
||||
dataToAdd.rolesKeyList,
|
||||
).then(() => {
|
||||
this.toast.showInfo('Project Grant Member successfully added!');
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
);
|
||||
})).then(() => {
|
||||
console.log('this');
|
||||
this.toast.showInfo('Project Grant Member successfully added!');
|
||||
}).catch(error => {
|
||||
this.toast.showError(error);
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user