mirror of
https://github.com/andwati/zitadel.git
synced 2026-11-25 22:08:46 +00:00
37 lines
1.0 KiB
TypeScript
37 lines
1.0 KiB
TypeScript
import { Component, Inject } from '@angular/core';
|
|
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material/dialog';
|
|
|
|
@Component({
|
|
selector: 'cnsl-user-grant-role-dialog',
|
|
templateUrl: './user-grant-role-dialog.component.html',
|
|
styleUrls: ['./user-grant-role-dialog.component.scss'],
|
|
})
|
|
export class UserGrantRoleDialogComponent {
|
|
public projectId: string = '';
|
|
public grantId: string = '';
|
|
public selectedRoleKeysList: string[] = [];
|
|
|
|
public selectedRoleKeys: string[] = [];
|
|
|
|
constructor(
|
|
public dialogRef: MatDialogRef<UserGrantRoleDialogComponent>,
|
|
@Inject(MAT_DIALOG_DATA) public data: any,
|
|
) {
|
|
this.projectId = data.projectId;
|
|
this.grantId = data.grantId;
|
|
this.selectedRoleKeysList = data.selectedRoleKeysList;
|
|
}
|
|
|
|
public selectRoles(selected: string[]): void {
|
|
this.selectedRoleKeys = selected;
|
|
}
|
|
|
|
public closeDialog(): void {
|
|
this.dialogRef.close(false);
|
|
}
|
|
|
|
public closeDialogWithSuccess(): void {
|
|
this.dialogRef.close({ roles: this.selectedRoleKeys });
|
|
}
|
|
}
|