mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-30 11:02:16 +00:00
* update and delete project grants * fix: user grant id (#421) * fix: verboser logging on sql err (#412) * fix(eventstore): improve insert statement * fix: verbose logging on error * fix: simplify insertEvents * fix: project grant delete (#417) * fix: add grant id to user grant if needed * fix: add grant id to user grant if needed Co-authored-by: Silvan <[email protected]> * fix user grant context * lint * role validators * fix: usergrantid (#424) * fix: verboser logging on sql err (#412) * fix(eventstore): improve insert statement * fix: verbose logging on error * fix: simplify insertEvents * fix: project grant delete (#417) * fix: add grant id to user grant if needed * fix: add grant id to user grant if needed * fix: add bulk remove * fix: merge Co-authored-by: Silvan <[email protected]> Co-authored-by: Fabi <[email protected]> Co-authored-by: Silvan <[email protected]>
91 lines
4.6 KiB
HTML
91 lines
4.6 KiB
HTML
<div class="table-header-row" *ngIf="projectId">
|
|
<div class="col">
|
|
<ng-container *ngIf="!selection.hasValue()">
|
|
<span class="desc">{{'ORG_DETAIL.TABLE.TOTAL' | translate}}</span>
|
|
<span class="count">{{dataSource.grantsSubject.value.length}}</span>
|
|
</ng-container>
|
|
<ng-container *ngIf="selection.hasValue()">
|
|
<span class="desc">{{'ORG_DETAIL.TABLE.SELECTION' | translate}}</span>
|
|
<span class="count">{{selection?.selected?.length}}</span>
|
|
</ng-container>
|
|
</div>
|
|
<span class="fill-space"></span>
|
|
<ng-template appHasRole [appHasRole]="['project.grant.member.delete:'+projectId, 'project.grant.member.delete']">
|
|
<button (click)="deleteSelectedGrants()" [disabled]="disabled" class="icon-button" mat-icon-button
|
|
*ngIf="selection.hasValue()" color="warn">
|
|
<i class="las la-trash"></i>
|
|
</button>
|
|
</ng-template>
|
|
<ng-template appHasRole [appHasRole]="['project.grant.member.write:'+projectId,'project.grant.member.write']">
|
|
<a [disabled]="disabled" color="primary" class="add-button" color="primary" mat-raised-button
|
|
[routerLink]="[ '/projects', projectId, 'grants', 'create']">
|
|
<mat-icon class="icon">add</mat-icon>{{ 'ACTIONS.NEW' | translate }}
|
|
</a>
|
|
</ng-template>
|
|
</div>
|
|
|
|
<div class="table-wrapper">
|
|
<div class="spinner-container" *ngIf="dataSource.loading$ | async">
|
|
<mat-spinner diameter="50"></mat-spinner>
|
|
</div>
|
|
<table mat-table multiTemplateDataRows class="full-width-table" aria-label="Elements" [dataSource]="dataSource">
|
|
|
|
<ng-container matColumnDef="select">
|
|
<th class="selection" mat-header-cell *matHeaderCellDef>
|
|
<mat-checkbox color="primary" (change)="$event ? masterToggle() : null"
|
|
[checked]="selection.hasValue() && isAllSelected()"
|
|
[indeterminate]="selection.hasValue() && !isAllSelected()">
|
|
</mat-checkbox>
|
|
</th>
|
|
<td class="selection" mat-cell *matCellDef="let row">
|
|
<mat-checkbox color="primary" (click)="$event.stopPropagation()"
|
|
(change)="$event ? selection.toggle(row) : null" [checked]="selection.isSelected(row)">
|
|
</mat-checkbox>
|
|
</td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="grantedOrgName">
|
|
<th mat-header-cell *matHeaderCellDef> {{ 'PROJECT.GRANT.GRANTEDORG' | translate }} </th>
|
|
<td [routerLink]="['/projects',grant.projectId,'grant', grant.id]" class="pointer" mat-cell
|
|
*matCellDef="let grant">
|
|
{{grant.grantedOrgName}} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="creationDate">
|
|
<th mat-header-cell *matHeaderCellDef> {{ 'PROJECT.GRANT.CREATIONDATE' | translate }} </th>
|
|
<td [routerLink]="['/projects',grant.projectId,'grant', grant.id]" class="pointer" mat-cell
|
|
*matCellDef="let grant">
|
|
{{grant.creationDate | timestampToDate | date: 'dd. MMM, HH:mm' }} </td>
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="changeDate">
|
|
<th mat-header-cell *matHeaderCellDef> {{ 'PROJECT.GRANT.CHANGEDATE' | translate }} </th>
|
|
<td [routerLink]="['/projects',grant.projectId,'grant', grant.id]" class="pointer" mat-cell
|
|
*matCellDef="let grant">
|
|
{{grant.changeDate | timestampToDate | date: 'dd. MMM, HH:mm' }} </td>
|
|
|
|
</ng-container>
|
|
|
|
<ng-container matColumnDef="roleNamesList">
|
|
<th mat-header-cell *matHeaderCellDef> {{ 'PROJECT.GRANT.ROLENAMESLIST' | translate }} </th>
|
|
<td class="pointer" mat-cell *matCellDef="let grant">
|
|
<mat-form-field class="form-field" appearance="outline" *ngIf="grant.roleKeysList">
|
|
<mat-label>{{ 'PROJECT.GRANT.ROLENAMESLIST' | translate }}</mat-label>
|
|
<mat-select [(ngModel)]="grant.roleKeysList" multiple
|
|
(selectionChange)="updateRoles(grant, $event)">
|
|
<mat-option *ngFor="let role of memberRoleOptions" [value]="role.key">
|
|
{{role.key}}
|
|
</mat-option>
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</td>
|
|
</ng-container>
|
|
|
|
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
|
|
<tr class="data-row" mat-row *matRowDef="let grant; columns: displayedColumns;" class="element-row">
|
|
</tr>
|
|
</table>
|
|
|
|
<mat-paginator #paginator [pageSize]="50" [pageSizeOptions]="[25, 50, 100, 250]">
|
|
</mat-paginator>
|
|
</div> |