User or unassigned option is not displayed in available options if it is in use
This commit is contained in:
parent
d5d2b043a2
commit
bae2cbf78a
@ -27,12 +27,12 @@
|
|||||||
[displayWith]="displayUserFn"
|
[displayWith]="displayUserFn"
|
||||||
(optionSelected)="selected($event)"
|
(optionSelected)="selected($event)"
|
||||||
panelWidth="260px">
|
panelWidth="260px">
|
||||||
<mat-option [ngClass]="{'assigned': !assigneeId}" [value]="null">
|
<mat-option [fxHide]="!assigneeId" [value]="null">
|
||||||
<mat-icon class="unassigned-icon">account_circle</mat-icon>
|
<mat-icon class="unassigned-icon">account_circle</mat-icon>
|
||||||
<span style="margin-right: auto" translate>alarm.unassigned</span>
|
<span translate>alarm.unassigned</span>
|
||||||
</mat-option>
|
</mat-option>
|
||||||
<mat-option [ngClass]="{ 'assigned': assigneeId === user.id.id }"
|
<mat-option *ngFor="let user of filteredUsers | async" [value]="user"
|
||||||
*ngFor="let user of filteredUsers | async" [value]="user">
|
[fxHide]="assigneeId === user.id.id">
|
||||||
<span class="user-avatar" [innerHTML]="getUserInitials(user)"
|
<span class="user-avatar" [innerHTML]="getUserInitials(user)"
|
||||||
[style.background-color]="getAvatarBgColor(user)">
|
[style.background-color]="getAvatarBgColor(user)">
|
||||||
</span>
|
</span>
|
||||||
|
|||||||
@ -13,6 +13,7 @@
|
|||||||
* See the License for the specific language governing permissions and
|
* See the License for the specific language governing permissions and
|
||||||
* limitations under the License.
|
* limitations under the License.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
:host {
|
:host {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
@ -26,7 +27,6 @@
|
|||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
height: 340px;
|
height: 340px;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
.mat-form-field-wrapper {
|
.mat-form-field-wrapper {
|
||||||
margin-right: 8px;
|
margin-right: 8px;
|
||||||
@ -44,17 +44,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.tb-assignee-autocomplete {
|
.tb-assignee-autocomplete {
|
||||||
|
|
||||||
&.tb-assignee-autocomplete.mat-autocomplete-visible {
|
&.tb-assignee-autocomplete.mat-autocomplete-visible {
|
||||||
position: relative;
|
position: relative;
|
||||||
left: -8px;
|
left: -8px;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
box-shadow: none !important;
|
box-shadow: none !important;
|
||||||
}
|
}
|
||||||
.assigned {
|
|
||||||
background-color: rgba(0, 0, 0, 0.06);
|
|
||||||
}
|
|
||||||
|
|
||||||
.mat-option {
|
.mat-option {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
border: none;
|
border: none;
|
||||||
@ -84,8 +79,8 @@
|
|||||||
}
|
}
|
||||||
.user-display-name {
|
.user-display-name {
|
||||||
max-width: 180px;
|
max-width: 180px;
|
||||||
|
overflow: hidden;
|
||||||
span {
|
span {
|
||||||
white-space: nowrap;
|
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -119,7 +119,7 @@ export class AlarmAssigneePanelComponent implements OnInit, AfterViewInit, OnDe
|
|||||||
}
|
}
|
||||||
|
|
||||||
selected(event: MatAutocompleteSelectedEvent): void {
|
selected(event: MatAutocompleteSelectedEvent): void {
|
||||||
this.selectUserFormGroup.get('user').patchValue('');
|
this.clear();
|
||||||
const user: User = event.option.value;
|
const user: User = event.option.value;
|
||||||
if (user) {
|
if (user) {
|
||||||
this.assign(user);
|
this.assign(user);
|
||||||
|
|||||||
@ -249,7 +249,7 @@ export class AlarmTableConfig extends EntityTableConfig<AlarmInfo, TimePageLink>
|
|||||||
const connectedPosition: ConnectedPosition = {
|
const connectedPosition: ConnectedPosition = {
|
||||||
originX: 'end',
|
originX: 'end',
|
||||||
originY: 'bottom',
|
originY: 'bottom',
|
||||||
overlayX: 'center',
|
overlayX: 'end',
|
||||||
overlayY: 'top'
|
overlayY: 'top'
|
||||||
};
|
};
|
||||||
config.positionStrategy = this.overlay.position().flexibleConnectedTo(target as HTMLElement)
|
config.positionStrategy = this.overlay.position().flexibleConnectedTo(target as HTMLElement)
|
||||||
|
|||||||
@ -1115,7 +1115,7 @@ export class AlarmsTableWidgetComponent extends PageComponent implements OnInit,
|
|||||||
const connectedPosition: ConnectedPosition = {
|
const connectedPosition: ConnectedPosition = {
|
||||||
originX: 'end',
|
originX: 'end',
|
||||||
originY: 'bottom',
|
originY: 'bottom',
|
||||||
overlayX: 'center',
|
overlayX: 'end',
|
||||||
overlayY: 'top'
|
overlayY: 'top'
|
||||||
};
|
};
|
||||||
config.positionStrategy = this.overlay.position().flexibleConnectedTo(target as HTMLElement)
|
config.positionStrategy = this.overlay.position().flexibleConnectedTo(target as HTMLElement)
|
||||||
|
|||||||
@ -4757,7 +4757,7 @@
|
|||||||
"display-alarm-details": "Display alarm details",
|
"display-alarm-details": "Display alarm details",
|
||||||
"allow-alarms-ack": "Allow alarms acknowledgment",
|
"allow-alarms-ack": "Allow alarms acknowledgment",
|
||||||
"allow-alarms-clear": "Allow alarms clear",
|
"allow-alarms-clear": "Allow alarms clear",
|
||||||
"display-alarm-comments": "Display alarm comments"
|
"display-alarm-comments": "Display alarm comments",
|
||||||
"allow-alarms-assign": "Allow alarms assignment"
|
"allow-alarms-assign": "Allow alarms assignment"
|
||||||
},
|
},
|
||||||
"value-source": {
|
"value-source": {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user