|
|
|
@ -74,7 +74,7 @@ |
|
|
|
<div class="mat-padding flex flex-col"> |
|
|
|
<form [formGroup]="entityForm"> |
|
|
|
<fieldset [disabled]="(isLoading$ | async) || !isEdit"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-form-field class="mat-block" appearance="outline"> |
|
|
|
<mat-label translate>user.email</mat-label> |
|
|
|
<input matInput type="email" formControlName="email" required> |
|
|
|
<mat-error *ngIf="entityForm.get('email').hasError('email')"> |
|
|
|
@ -84,30 +84,52 @@ |
|
|
|
{{ 'user.email-required' | translate }} |
|
|
|
</mat-error> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-form-field class="mat-block" appearance="outline"> |
|
|
|
<mat-label translate>user.first-name</mat-label> |
|
|
|
<input matInput formControlName="firstName"> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-form-field class="mat-block" appearance="outline"> |
|
|
|
<mat-label translate>user.last-name</mat-label> |
|
|
|
<input matInput formControlName="lastName"> |
|
|
|
</mat-form-field> |
|
|
|
<tb-phone-input [required]="false" |
|
|
|
label="{{ 'contact.phone' | translate }}" |
|
|
|
[enableFlagsSelect]="true" |
|
|
|
appearance="outline" |
|
|
|
formControlName="phone"> |
|
|
|
</tb-phone-input> |
|
|
|
<div formGroupName="additionalInfo" class="flex flex-col"> |
|
|
|
<mat-form-field class="mat-block"> |
|
|
|
<mat-form-field class="mat-block" floatLabel="always" appearance="outline"> |
|
|
|
<mat-label translate>language.language</mat-label> |
|
|
|
<mat-select formControlName="lang" |
|
|
|
[placeholder]="'language.auto' | translate"> |
|
|
|
<mat-option [value]="null">{{ 'language.auto' | translate }}</mat-option> |
|
|
|
@for(lang of languageList; track lang) { |
|
|
|
<mat-option [value]="lang">{{ 'language.locales.' + lang | translate }}</mat-option> |
|
|
|
} |
|
|
|
</mat-select> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block" floatLabel="always" appearance="outline"> |
|
|
|
<mat-label translate>unit.unit-system</mat-label> |
|
|
|
<mat-select formControlName="unitSystem" |
|
|
|
[placeholder]="'unit.unit-system-type.AUTO' | translate"> |
|
|
|
<mat-option [value]="null">{{ 'unit.unit-system-type.AUTO' | translate }}</mat-option> |
|
|
|
@for(unit of UnitSystems; track unit) { |
|
|
|
<mat-option [value]="unit">{{ 'unit.unit-system-type.' + unit | translate }}</mat-option> |
|
|
|
} |
|
|
|
</mat-select> |
|
|
|
</mat-form-field> |
|
|
|
<mat-form-field class="mat-block" appearance="outline"> |
|
|
|
<mat-label translate>user.description</mat-label> |
|
|
|
<textarea matInput formControlName="description" rows="2"></textarea> |
|
|
|
</mat-form-field> |
|
|
|
<section class="tb-default-dashboard flex flex-1 flex-col" *ngIf="entity?.id"> |
|
|
|
<section class="flex flex-1 flex-col gt-sm:flex-row"> |
|
|
|
<section class="flex flex-1 flex-col items-baseline gt-sm:flex-row"> |
|
|
|
<tb-dashboard-autocomplete |
|
|
|
class="flex-1" |
|
|
|
label="{{ 'user.default-dashboard' | translate }}" |
|
|
|
formControlName="defaultDashboardId" |
|
|
|
appearance="outline" |
|
|
|
[dashboardsScope]="entity?.authority === authority.TENANT_ADMIN ? 'tenant' : 'customer'" |
|
|
|
[tenantId]="entity?.tenantId?.id" |
|
|
|
[customerId]="entity?.customerId?.id" |
|
|
|
@ -117,11 +139,12 @@ |
|
|
|
{{ 'user.always-fullscreen' | translate }} |
|
|
|
</mat-checkbox> |
|
|
|
</section> |
|
|
|
<section class="flex flex-1 flex-col gt-sm:flex-row"> |
|
|
|
<section class="flex flex-1 flex-col items-baseline gt-sm:flex-row"> |
|
|
|
<tb-dashboard-autocomplete |
|
|
|
class="flex-1" |
|
|
|
label="{{ 'dashboard.home-dashboard' | translate }}" |
|
|
|
formControlName="homeDashboardId" |
|
|
|
appearance="outline" |
|
|
|
[dashboardsScope]="entity?.authority === authority.TENANT_ADMIN ? 'tenant' : 'customer'" |
|
|
|
[tenantId]="entity?.tenantId?.id" |
|
|
|
[customerId]="entity?.customerId?.id" |
|
|
|
|