2020-10-11 11:40:32 -07:00
|
|
|
<div class="{{this.baseClass}}__tag-input">
|
|
|
|
{{#if (eq recipientType 'distributionList')}}
|
|
|
|
{{#each @distributionLists as |distributionList index|}}
|
2020-11-09 12:17:51 -08:00
|
|
|
<NachoPill::NachoPillInput
|
|
|
|
@class="{{this.baseClass}}__pill"
|
2020-10-11 11:40:32 -07:00
|
|
|
@value={{distributionList}}
|
|
|
|
@onDelete={{fn @removeRecipient this.recipientType index}}
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
{{else}}
|
|
|
|
{{#each @individualRecipients as |individualRecipient index|}}
|
2020-11-09 12:17:51 -08:00
|
|
|
<NachoPill::NachoPillInput
|
2020-10-11 11:40:32 -07:00
|
|
|
class="{{this.baseClass}}__pill"
|
|
|
|
@value={{individualRecipient}}
|
|
|
|
@onDelete={{fn @removeRecipient this.recipientType index}}
|
|
|
|
/>
|
|
|
|
{{/each}}
|
|
|
|
{{/if}}
|
2020-11-09 12:17:51 -08:00
|
|
|
<NachoPill::NachoPillInput
|
|
|
|
@class="{{this.baseClass}}__pill"
|
2020-10-11 11:40:32 -07:00
|
|
|
@isTypeahead={{true}}
|
|
|
|
@placeholder={{if (eq recipientType 'distributionList') "e.g.,datahub-dev" "e.g.,jweiner"}}
|
|
|
|
@onComplete={{fn this.onAddRecipient}}
|
|
|
|
@onSearch={{perform this.onSearchTask}}
|
|
|
|
as |result|
|
|
|
|
>
|
|
|
|
<div class="{{this.baseClass}}__suggestions-list-item">
|
|
|
|
<div class="{{this.baseClass}}__icon-container">
|
|
|
|
{{#if (eq recipientType 'distributionList')}}
|
|
|
|
<FaIcon
|
|
|
|
class="{{this.baseClass}}__icon"
|
|
|
|
@prefix="fas"
|
|
|
|
@icon="users"
|
|
|
|
/>
|
|
|
|
{{else}}
|
2020-10-20 10:26:02 -07:00
|
|
|
<NachoAvatar::NachoAvatarImage
|
2020-10-11 11:40:32 -07:00
|
|
|
class="{{this.baseClass}}__icon"
|
|
|
|
@img={{result.profilePictureUrl}}
|
|
|
|
/>
|
|
|
|
{{/if}}
|
|
|
|
</div>
|
|
|
|
<div class="{{this.baseClass}}__suggestions-list-item-detail">
|
|
|
|
<div class="{{this.baseClass}}__suggestions-list-item-detail-name">
|
|
|
|
<strong>
|
|
|
|
{{if (eq recipientType 'distributionList') result.entity.name result.name}}
|
|
|
|
</strong>
|
|
|
|
</div>
|
|
|
|
<div class="{{this.baseClass}}__suggestions-list-item-detail-email">
|
|
|
|
{{if (eq recipientType 'distributionList') result.entity.info.email result.username}}
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
2020-11-09 12:17:51 -08:00
|
|
|
</NachoPill::NachoPillInput>
|
2020-10-11 11:40:32 -07:00
|
|
|
</div>
|