|
|
|
@ -15,63 +15,63 @@ |
|
|
|
limitations under the License. |
|
|
|
|
|
|
|
--> |
|
|
|
<div class="tb-details-buttons" fxLayout.xs="column"> |
|
|
|
<div class="tb-details-buttons xs:flex xs:flex-col"> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
(click)="onEntityAction($event, 'open')" |
|
|
|
[fxShow]="!isEdit && !isDetailsPage"> |
|
|
|
[class.!hidden]="isEdit || isDetailsPage"> |
|
|
|
{{'common.open-details-page' | translate }} |
|
|
|
</button> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
(click)="onEntityAction($event, 'disableAccount')" |
|
|
|
[fxShow]="!isEdit && isUserCredentialPresent() && isUserCredentialsEnabled()"> |
|
|
|
[class.!hidden]="isEdit || !isUserCredentialPresent() || !isUserCredentialsEnabled()"> |
|
|
|
{{'user.disable-account' | translate }} |
|
|
|
</button> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
(click)="onEntityAction($event, 'enableAccount')" |
|
|
|
[fxShow]="!isEdit && isUserCredentialPresent() && !isUserCredentialsEnabled()"> |
|
|
|
[class.!hidden]="isEdit || !isUserCredentialPresent() || isUserCredentialsEnabled()"> |
|
|
|
{{'user.enable-account' | translate }} |
|
|
|
</button> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
(click)="onEntityAction($event, 'displayActivationLink')" |
|
|
|
[fxShow]="!isEdit && !isUserCredentialPresent()"> |
|
|
|
[class.!hidden]="isEdit || isUserCredentialPresent()"> |
|
|
|
{{'user.display-activation-link' | translate }} |
|
|
|
</button> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
(click)="onEntityAction($event, 'resendActivation')" |
|
|
|
[fxShow]="!isEdit && !isUserCredentialPresent()"> |
|
|
|
[class.!hidden]="isEdit || isUserCredentialPresent()"> |
|
|
|
{{'user.resend-activation' | translate }} |
|
|
|
</button> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
(click)="onEntityAction($event, 'loginAsUser')" |
|
|
|
*ngIf="loginAsUserEnabled$ | async" |
|
|
|
[fxShow]="!isEdit"> |
|
|
|
[class.!hidden]="isEdit"> |
|
|
|
{{ (entity?.authority === authority.TENANT_ADMIN ? 'user.login-as-tenant-admin' : 'user.login-as-customer-user') | translate }} |
|
|
|
</button> |
|
|
|
<button mat-raised-button color="primary" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
(click)="onEntityAction($event, 'delete')" |
|
|
|
[fxShow]="!hideDelete() && !isEdit"> |
|
|
|
[class.!hidden]="hideDelete() || isEdit"> |
|
|
|
{{'user.delete' | translate }} |
|
|
|
</button> |
|
|
|
<div fxLayout="row" fxLayout.xs="column"> |
|
|
|
<div class="flex flex-row xs:flex-col"> |
|
|
|
<button mat-raised-button |
|
|
|
ngxClipboard |
|
|
|
(cbOnSuccess)="onUserIdCopied($event)" |
|
|
|
[cbContent]="entity?.id?.id" |
|
|
|
[disabled]="(isLoading$ | async)" |
|
|
|
[fxShow]="!isEdit"> |
|
|
|
[class.!hidden]="isEdit"> |
|
|
|
<mat-icon svgIcon="mdi:clipboard-arrow-left"></mat-icon> |
|
|
|
<span translate>user.copyId</span> |
|
|
|
</button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<div class="mat-padding" fxLayout="column"> |
|
|
|
<div class="mat-padding flex flex-col"> |
|
|
|
<form [formGroup]="entityForm"> |
|
|
|
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
@ -97,15 +97,15 @@ |
|
|
|
[enableFlagsSelect]="true" |
|
|
|
formControlName="phone"> |
|
|
|
</tb-phone-input> |
|
|
|
<div formGroupName="additionalInfo" fxLayout="column"> |
|
|
|
<div formGroupName="additionalInfo" class="flex flex-col"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-label translate>user.description</mat-label> |
|
|
|
<textarea matInput formControlName="description" rows="2"></textarea> |
|
|
|
</mat-form-field> |
|
|
|
<section class="tb-default-dashboard" fxFlex fxLayout="column" *ngIf="entity?.id"> |
|
|
|
<section fxFlex fxLayout="column" fxLayout.gt-sm="row"> |
|
|
|
<section class="tb-default-dashboard flex flex-1 flex-col" *ngIf="entity?.id"> |
|
|
|
<section class="flex flex-1 flex-col gt-sm:flex-row"> |
|
|
|
<tb-dashboard-autocomplete |
|
|
|
fxFlex |
|
|
|
class="flex-1" |
|
|
|
label="{{ 'user.default-dashboard' | translate }}" |
|
|
|
formControlName="defaultDashboardId" |
|
|
|
[dashboardsScope]="entity?.authority === authority.TENANT_ADMIN ? 'tenant' : 'customer'" |
|
|
|
@ -113,13 +113,13 @@ |
|
|
|
[customerId]="entity?.customerId?.id" |
|
|
|
[selectFirstDashboard]="false" |
|
|
|
></tb-dashboard-autocomplete> |
|
|
|
<mat-checkbox fxFlex formControlName="defaultDashboardFullscreen"> |
|
|
|
<mat-checkbox class="flex-1" formControlName="defaultDashboardFullscreen"> |
|
|
|
{{ 'user.always-fullscreen' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
</section> |
|
|
|
<section fxFlex fxLayout="column" fxLayout.gt-sm="row"> |
|
|
|
<section class="flex flex-1 flex-col gt-sm:flex-row"> |
|
|
|
<tb-dashboard-autocomplete |
|
|
|
fxFlex |
|
|
|
class="flex-1" |
|
|
|
label="{{ 'dashboard.home-dashboard' | translate }}" |
|
|
|
formControlName="homeDashboardId" |
|
|
|
[dashboardsScope]="entity?.authority === authority.TENANT_ADMIN ? 'tenant' : 'customer'" |
|
|
|
@ -127,7 +127,7 @@ |
|
|
|
[customerId]="entity?.customerId?.id" |
|
|
|
[selectFirstDashboard]="false" |
|
|
|
></tb-dashboard-autocomplete> |
|
|
|
<mat-checkbox fxFlex formControlName="homeDashboardHideToolbar"> |
|
|
|
<mat-checkbox class="flex-1" formControlName="homeDashboardHideToolbar"> |
|
|
|
{{ 'dashboard.home-dashboard-hide-toolbar' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
</section> |
|
|
|
|