Files
zitadel/console/src/app/pages/projects/owned-projects/project-grants/project-grants.component.html
T
Max PeintnerGitHubdependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>Florian ForsterLivio Spring
c9445227c5 fix(console): angular 15 (#4809)
* cli core

* update material

* imports

* schematics

* lint

* rm ng-qrcode, ngx-quicklink

* replace qr code lib

* rm shared module as quicklink is removed

* lazy loading imports

* rm public

* chore(deps): bump @grpc/grpc-js from 1.7.1 to 1.8.0 in /console (#4857)

Bumps [@grpc/grpc-js](https://github.com/grpc/grpc-node) from 1.7.1 to 1.8.0.
- [Release notes](https://github.com/grpc/grpc-node/releases)
- [Commits](https://github.com/grpc/grpc-node/compare/v1.7.1...@grpc/[email protected])

---
updated-dependencies:
- dependency-name: "@grpc/grpc-js"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump libphonenumber-js from 1.10.13 to 1.10.15 in /console (#4861)

Bumps [libphonenumber-js](https://gitlab.com/catamphetamine/libphonenumber-js) from 1.10.13 to 1.10.15.
- [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.13...v1.10.15)

---
updated-dependencies:
- dependency-name: libphonenumber-js
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* rxjs

* chore(deps): bump engine.io from 6.2.0 to 6.2.1 in /console (#4734)

Bumps [engine.io](https://github.com/socketio/engine.io) from 6.2.0 to 6.2.1.
- [Release notes](https://github.com/socketio/engine.io/releases)
- [Changelog](https://github.com/socketio/engine.io/blob/main/CHANGELOG.md)
- [Commits](https://github.com/socketio/engine.io/compare/6.2.0...6.2.1)

---
updated-dependencies:
- dependency-name: engine.io
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <[email protected]>

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* lock

* lint

* rm comments

* tsconfig ES2022

* get rid of polyfills file

* use node 18

* rm age policy, legacy components

* packages

* build beta prerelease

* remove pre-release build

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Florian Forster <[email protected]>
Co-authored-by: Livio Spring <[email protected]>
2023-01-11 13:23:16 +00:00

162 lines
6.7 KiB
HTML

<div class="max-width-container">
<div class="project-grants-wrapper">
<div class="project-grants">
<cnsl-refresh-table
[loading]="dataSource.loading$ | async"
*ngIf="projectId"
(refreshed)="loadGrantsPage()"
[dataSize]="dataSource.totalResult"
[selection]="selection"
[timestamp]="dataSource.viewTimestamp"
(refreshed)="getRoleOptions(projectId)"
>
<div actions>
<a
[disabled]="(['project.grant.write$', 'project.grant.write:' + projectId] | hasRole | async) === false"
color="primary"
class="cnsl-action-button"
mat-raised-button
[routerLink]="['/projects', projectId, 'projectgrants', 'create']"
>
<mat-icon class="icon">add</mat-icon>
<span>{{ 'ACTIONS.NEW' | translate }}</span>
<cnsl-action-keys (actionTriggered)="gotoRouterLink(['/projects', projectId, 'projectgrants', 'create'])">
</cnsl-action-keys>
</a>
</div>
<div class="table-wrapper">
<table mat-table multiTemplateDataRows class="table" aria-label="Elements" [dataSource]="dataSource">
<ng-container matColumnDef="select">
<th class="selection" mat-header-cell *matHeaderCellDef>
<mat-checkbox
[disabled]="(['project.grant.write$', 'project.grant.write:' + projectId] | hasRole | async) === false"
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
[disabled]="(['project.grant.write$', 'project.grant.write:' + projectId] | hasRole | async) === false"
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, 'projectgrants', grant.grantId]"
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
class="pointer"
mat-cell
*matCellDef="let grant"
[routerLink]="['/projects', grant.projectId, 'projectgrants', grant.grantId]"
>
<span>{{ grant.details.creationDate | timestampToDate | localizedDate : 'dd. MMM, HH:mm' }}</span>
</td>
</ng-container>
<ng-container matColumnDef="changeDate">
<th mat-header-cell *matHeaderCellDef>{{ 'PROJECT.GRANT.CHANGEDATE' | translate }}</th>
<td
class="pointer"
mat-cell
*matCellDef="let grant"
[routerLink]="['/projects', grant.projectId, 'projectgrants', grant.grantId]"
>
<span>{{ grant.details.changeDate | timestampToDate | localizedDate : 'dd. MMM, HH:mm' }}</span>
</td>
</ng-container>
<ng-container matColumnDef="state">
<th mat-header-cell *matHeaderCellDef>{{ 'PROJECT.GRANT.STATE' | translate }}</th>
<td
class="pointer"
mat-cell
*matCellDef="let grant"
[routerLink]="['/projects', grant.projectId, 'projectgrants', grant.grantId]"
>
<span
class="state"
[ngClass]="{
active: grant.state === ProjectGrantState.PROJECT_GRANT_STATE_ACTIVE,
inactive: grant.state === ProjectGrantState.PROJECT_GRANT_STATE_INACTIVE
}"
>
{{ 'PROJECT.GRANT.STATES.' + grant.state | translate }}
</span>
</td>
</ng-container>
<ng-container matColumnDef="roleNamesList">
<th mat-header-cell *matHeaderCellDef class="role-row">{{ 'PROJECT.GRANT.ROLENAMESLIST' | translate }}</th>
<td class="pointer role-row" mat-cell *matCellDef="let grant">
<div class="flex-row">
<cnsl-project-role-chip [roleName]="role" *ngFor="let role of grant.grantedRoleKeysList"
>{{ role }}
</cnsl-project-role-chip>
</div>
</td>
</ng-container>
<ng-container matColumnDef="actions" stickyEnd>
<th mat-header-cell *matHeaderCellDef class="role-table-actions"></th>
<td mat-cell *matCellDef="let grant" class="role-table-actions">
<cnsl-table-actions>
<button
actions
[disabled]="(['project.role.delete', 'project.role.delete:' + projectId] | hasRole | async) === false"
mat-icon-button
color="warn"
matTooltip="{{ 'ACTIONS.DELETE' | translate }}"
(click)="deleteGrant(grant)"
>
<i class="las la-trash"></i>
</button>
</cnsl-table-actions>
</td>
</ng-container>
<tr mat-header-row *matHeaderRowDef="displayedColumns"></tr>
<tr class="highlight" mat-row *matRowDef="let grant; columns: displayedColumns"></tr>
</table>
</div>
<div *ngIf="(dataSource.loading$ | async) === false && !dataSource?.totalResult" class="no-content-row">
<i class="las la-exclamation"></i>
<span>{{ 'PROJECT.GRANT.EMPTY' | translate }}</span>
</div>
<cnsl-paginator
class="paginator"
#paginator
[pageSize]="50"
[timestamp]="dataSource.viewTimestamp"
[pageSizeOptions]="[25, 50, 100, 250]"
[length]="dataSource.totalResult"
(page)="loadGrantsPage($event.pageIndex, $event.pageSize)"
>
</cnsl-paginator>
</cnsl-refresh-table>
</div>
</div>
</div>