Fixed assignee cell height not matching row height in alarm entity table

This commit is contained in:
rusikv 2023-04-20 18:09:06 +03:00
parent a0c370079e
commit 7549e25969
2 changed files with 21 additions and 21 deletions

View File

@ -120,18 +120,11 @@ export class AlarmTableConfig extends EntityTableConfig<AlarmInfo, TimePageLink>
color: alarmSeverityColors.get(entity.severity) color: alarmSeverityColors.get(entity.severity)
}))); })));
this.columns.push( this.columns.push(
new EntityTableColumn<AlarmInfo>('assignee', 'alarm.assignee', '200px', new EntityTableColumn<AlarmInfo>('assignee', 'alarm.assignee', '240px',
(entity) => { (entity) => {
return this.getAssigneeTemplate(entity) return this.getAssigneeTemplate(entity)
}, },
(entity) => { () => ({}),
return {
display: 'flex',
justifyContent: 'start',
alignItems: 'center',
height: 'inherit'
}
},
false, false,
() => ({}), () => ({}),
(entity) => undefined, (entity) => undefined,
@ -203,8 +196,10 @@ export class AlarmTableConfig extends EntityTableConfig<AlarmInfo, TimePageLink>
<span class="user-display-name">${this.getUserDisplayName(entity)}</span> <span class="user-display-name">${this.getUserDisplayName(entity)}</span>
</span>` </span>`
: :
`<mat-icon class="material-icons unassigned-icon">account_circle</mat-icon> `<span class="unassigned-container">
<span>${this.translate.instant('alarm.unassigned')}</span>` <mat-icon class="material-icons unassigned-icon">account_circle</mat-icon>
<span>${this.translate.instant('alarm.unassigned')}</span>
</span>`
} }
</span>` </span>`
} }

View File

@ -21,10 +21,10 @@
} }
} }
.assignee-cell { .assignee-cell {
display: flex; line-height: normal;
justify-content: flex-start;
align-items: center;
.assigned-container { .assigned-container {
display: inline-block;
vertical-align: baseline;
max-width: 180px; max-width: 180px;
overflow: hidden; overflow: hidden;
white-space: nowrap; white-space: nowrap;
@ -44,6 +44,9 @@
font-weight: 700; font-weight: 700;
} }
} }
.unassigned-container {
display: inline-flex;
align-items: center;
.material-icons.unassigned-icon { .material-icons.unassigned-icon {
width: 28px; width: 28px;
height: 28px; height: 28px;
@ -53,5 +56,7 @@
overflow: visible; overflow: visible;
} }
} }
}
} }
} }