Files
smartguide/webapp/src/app/modules/accounts/accounts.component.html
T

102 lines
2.9 KiB
HTML

<section class="accounts-page">
<app-page-header
title="Accounts"
[subtitle]="
isReadOnly
? 'Personen der eigenen Organisation ansehen.'
: 'Account-Zugänge verwalten, Rollen setzen und Impersonation starten.'
" />
<section class="account-toolbar">
<app-query-param-input
class="account-search"
queryParamKey="search"
label="Nach Name oder E-Mail suchen" />
<app-query-param-selector
class="account-organization"
queryParamKey="organization_id"
[options]="selectorOptions()"
label="Organisation"
[allowEmptyValue]="true" />
@if (!isReadOnly) {
<button
class="create-account-button"
mat-flat-button
color="primary"
type="button"
matTooltip="Neuen Account anlegen"
(click)="startCreate()">
<mat-icon>{{ PERSON_ADD_ICON }}</mat-icon>
Neuer Account
</button>
}
</section>
<mat-card appearance="outlined">
<mat-card-content>
<app-data-table [columns]="accountColumns" [data]="accountPage().items" />
</mat-card-content>
</mat-card>
<app-query-param-paginator [total]="accountPage().total" />
</section>
<ng-template #accountRoleTmp let-row>
@for (role of row.roles; track role) {
<span class="role">{{ role | role }}</span>
}
</ng-template>
<ng-template #accountStatusTmp let-row>
<span
class="status"
[class.status--deleted]="row.deleted"
[class.status--deactivated]="!row.deleted && !row.activated">
{{
(row.deleted ? 'deleted' : row.activated ? 'active' : 'inactive') | status
}}
</span>
</ng-template>
<ng-template #accountActionsTmp let-row>
<div class="row-actions">
<button
mat-icon-button
type="button"
aria-label="Bearbeiten"
matTooltip="Account bearbeiten"
(click)="startEdit(row)">
<mat-icon>{{ EDIT_ICON }}</mat-icon>
</button>
<button
mat-icon-button
type="button"
aria-label="Impersonate"
matTooltip="Als dieser Account anmelden (Impersonation)"
[disabled]="!canImpersonate(row)"
(click)="impersonate(row)">
<mat-icon>{{ SWITCH_ACCOUNT_ICON }}</mat-icon>
</button>
<button
mat-icon-button
type="button"
[attr.aria-label]="row.activated ? 'Deaktivieren' : 'Aktivieren'"
[matTooltip]="
row.activated ? 'Account deaktivieren' : 'Account aktivieren'
"
[disabled]="row.is_current || row.deleted"
(click)="toggleAccountActivation(row)">
<mat-icon>{{
row.activated ? PERSON_OFF_ICON : PERSON_CHECK_ICON
}}</mat-icon>
</button>
<button
mat-icon-button
type="button"
aria-label="Deaktivieren"
matTooltip="Account deaktivieren"
[disabled]="row.is_current || row.deleted"
(click)="deleteAccount(row)">
<mat-icon>{{ DELETE_ICON }}</mat-icon>
</button>
</div>
</ng-template>