mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
HXPMNT-542 display email for people (#10622)
This commit is contained in:
@@ -11,54 +11,60 @@
|
||||
<mat-chip-grid #userMultipleChipList data-automation-id="adf-cloud-people-chip-list">
|
||||
<mat-chip-row
|
||||
*ngFor="let user of selectedUsers"
|
||||
[removable]="!(user.readonly)"
|
||||
[removable]="!user.readonly"
|
||||
[attr.data-automation-id]="'adf-people-cloud-chip-' + user.username"
|
||||
(removed)="onRemove(user)"
|
||||
[disabled]="isReadonly() || isValidationLoading()"
|
||||
title="{{ (user.readonly ? 'ADF_CLOUD_GROUPS.MANDATORY' : '') | translate }}"
|
||||
[matTooltip]="showFullNameOnHover ? (user | fullName) : ''"
|
||||
>
|
||||
{{user | fullName}}
|
||||
[matTooltip]="showFullNameOnHover ? (user | fullName : true) : user.email"
|
||||
>
|
||||
{{ user | fullName }}
|
||||
<mat-icon
|
||||
matChipRemove
|
||||
*ngIf="!(user.readonly || readOnly)"
|
||||
[attr.data-automation-id]="'adf-people-cloud-chip-remove-icon-' + user.username">
|
||||
[attr.data-automation-id]="'adf-people-cloud-chip-remove-icon-' + user.username"
|
||||
>
|
||||
cancel
|
||||
</mat-icon>
|
||||
</mat-chip-row>
|
||||
<input matInput
|
||||
[disabled]="isReadonly()"
|
||||
[formControl]="searchUserCtrl"
|
||||
[matAutocomplete]="auto"
|
||||
[matChipInputFor]="userMultipleChipList"
|
||||
[required]="required"
|
||||
[placeholder]="placeholder"
|
||||
(focus)="setFocus(true)"
|
||||
(blur)="setFocus(false); markAsTouched()"
|
||||
class="adf-cloud-input"
|
||||
data-automation-id="adf-people-cloud-search-input"
|
||||
#userInput
|
||||
>
|
||||
<input
|
||||
matInput
|
||||
[disabled]="isReadonly()"
|
||||
[formControl]="searchUserCtrl"
|
||||
[matAutocomplete]="auto"
|
||||
[matChipInputFor]="userMultipleChipList"
|
||||
[required]="required"
|
||||
[placeholder]="placeholder"
|
||||
(focus)="setFocus(true)"
|
||||
(blur)="setFocus(false); markAsTouched()"
|
||||
class="adf-cloud-input"
|
||||
data-automation-id="adf-people-cloud-search-input"
|
||||
#userInput
|
||||
/>
|
||||
</mat-chip-grid>
|
||||
|
||||
<mat-autocomplete autoActiveFirstOption class="adf-people-cloud-list"
|
||||
#auto="matAutocomplete"
|
||||
(optionSelected)="onSelect($event.option.value)"
|
||||
[displayWith]="getDisplayName">
|
||||
<ng-container *ngIf="(searchUsers$ | async)?.length else noResults" >
|
||||
<mat-option *ngFor="let user of searchUsers$ | async; let i = index" [value]="user"
|
||||
class="adf-people-cloud-option-active">
|
||||
<div class="adf-people-cloud-row" id="adf-people-cloud-user-{{user.username}}"
|
||||
data-automation-id="adf-people-cloud-row">
|
||||
<div [outerHTML]="user | usernameInitials:'adf-people-cloud-pic'"></div>
|
||||
<span class="adf-people-label-name"> {{user | fullName}}</span>
|
||||
</div>
|
||||
</mat-option>
|
||||
<mat-autocomplete
|
||||
autoActiveFirstOption
|
||||
class="adf-people-cloud-list"
|
||||
#auto="matAutocomplete"
|
||||
(optionSelected)="onSelect($event.option.value)"
|
||||
[displayWith]="getDisplayName"
|
||||
>
|
||||
<ng-container *ngIf="(searchUsers$ | async)?.length; else noResults">
|
||||
<mat-option *ngFor="let user of searchUsers$ | async; let i = index" [value]="user" class="adf-people-cloud-option-active">
|
||||
<div class="adf-people-cloud-row" id="adf-people-cloud-user-{{ user.username }}" data-automation-id="adf-people-cloud-row">
|
||||
<div [outerHTML]="user | usernameInitials : 'adf-people-cloud-pic'"></div>
|
||||
<span class="adf-people-label-name"> {{ user | fullName : true }}</span>
|
||||
</div>
|
||||
</mat-option>
|
||||
</ng-container>
|
||||
<ng-template #noResults>
|
||||
<mat-option *ngIf="searchUserCtrl.hasError('searchTypingError') && !searchLoading" disabled
|
||||
class="adf-people-cloud-option-not-active"
|
||||
data-automation-id="adf-people-cloud-no-results">
|
||||
<mat-option
|
||||
*ngIf="searchUserCtrl.hasError('searchTypingError') && !searchLoading"
|
||||
disabled
|
||||
class="adf-people-cloud-option-not-active"
|
||||
data-automation-id="adf-people-cloud-no-results"
|
||||
>
|
||||
<span> {{ 'ADF_CLOUD_USERS.ERROR.NOT_FOUND' | translate : { userName: searchedValue } }}</span>
|
||||
</mat-option>
|
||||
</ng-template>
|
||||
@@ -70,29 +76,40 @@
|
||||
<div class="adf-error-container" *ngIf="showErrors">
|
||||
<mat-error *ngIf="hasPreselectError() && !isValidationLoading()" [@transitionMessages]="subscriptAnimationState" class="adf-error">
|
||||
<mat-icon class="adf-error-icon">error_outline</mat-icon>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_USERS.ERROR.NOT_FOUND' | translate : { userName : validateUsersMessage } }}</div>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_USERS.ERROR.NOT_FOUND' | translate : { userName: validateUsersMessage } }}</div>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="searchUserCtrl.hasError('pattern')" [@transitionMessages]="subscriptAnimationState" class="adf-error">
|
||||
<mat-icon class="adf-error-icon">error_outline</mat-icon>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_PEOPLE_GROUPS.ERROR.INVALID_PATTERN' | translate: { pattern: getValidationPattern() } }}</div>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_PEOPLE_GROUPS.ERROR.INVALID_PATTERN' | translate : { pattern: getValidationPattern() } }}</div>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="searchUserCtrl.hasError('maxlength')" [@transitionMessages]="subscriptAnimationState" class="adf-error">
|
||||
<mat-icon class="adf-error-icon">error_outline</mat-icon>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_PEOPLE_GROUPS.ERROR.INVALID_MAX_LENGTH' | translate: { requiredLength: getValidationMaxLength() } }}</div>
|
||||
<div class="adf-error-text">
|
||||
{{ 'ADF_CLOUD_PEOPLE_GROUPS.ERROR.INVALID_MAX_LENGTH' | translate : { requiredLength: getValidationMaxLength() } }}
|
||||
</div>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="searchUserCtrl.hasError('minlength')" [@transitionMessages]="subscriptAnimationState" class="adf-error">
|
||||
<mat-icon class="adf-error-icon">error_outline</mat-icon>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_PEOPLE_GROUPS.ERROR.INVALID_MIN_LENGTH' | translate: { requiredLength: getValidationMinLength() } }}</div>
|
||||
<div class="adf-error-text">
|
||||
{{ 'ADF_CLOUD_PEOPLE_GROUPS.ERROR.INVALID_MIN_LENGTH' | translate : { requiredLength: getValidationMinLength() } }}
|
||||
</div>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="(searchUserCtrl.hasError('required') || userChipsCtrl.hasError('required')) && isDirty()"
|
||||
[@transitionMessages]="subscriptAnimationState" class="adf-error">
|
||||
<mat-error
|
||||
*ngIf="(searchUserCtrl.hasError('required') || userChipsCtrl.hasError('required')) && isDirty()"
|
||||
[@transitionMessages]="subscriptAnimationState"
|
||||
class="adf-error"
|
||||
>
|
||||
<mat-icon class="adf-error-icon">error_outline</mat-icon>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_PEOPLE_GROUPS.ERROR.REQUIRED' | translate }}</div>
|
||||
</mat-error>
|
||||
<mat-error *ngIf="searchUserCtrl.hasError('searchTypingError') && !this.isFocused"
|
||||
[@transitionMessages]="subscriptAnimationState" data-automation-id="invalid-users-typing-error" class="adf-error">
|
||||
<mat-error
|
||||
*ngIf="searchUserCtrl.hasError('searchTypingError') && !this.isFocused"
|
||||
[@transitionMessages]="subscriptAnimationState"
|
||||
data-automation-id="invalid-users-typing-error"
|
||||
class="adf-error"
|
||||
>
|
||||
<mat-icon class="adf-error-icon">error_outline</mat-icon>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_USERS.ERROR.NOT_FOUND' | translate : { userName : searchedValue } }}</div>
|
||||
<div class="adf-error-text">{{ 'ADF_CLOUD_USERS.ERROR.NOT_FOUND' | translate : { userName: searchedValue } }}</div>
|
||||
</mat-error>
|
||||
</div>
|
||||
</form>
|
||||
|
Reference in New Issue
Block a user