Show acknowledge author, fixes #1281

Also fix displaying time
This commit is contained in:
Alexander Zobnin
2023-03-21 14:00:17 +01:00
parent f1c3c57c9f
commit f7150f9281
5 changed files with 62 additions and 6 deletions

View File

@@ -19,7 +19,7 @@ export default function AcknowledgesList(props: AcknowledgesListProps) {
<div className="problem-ack-col problem-ack-user">
{acknowledges.map((ack) => (
<span key={ack.acknowledgeid} className="problem-ack-user">
{ack.user}
{formatUserName(ack)}
</span>
))}
</div>
@@ -33,3 +33,11 @@ export default function AcknowledgesList(props: AcknowledgesListProps) {
</div>
);
}
function formatUserName(ack: ZBXAcknowledge): string {
if (!ack.name && !ack.surname) {
return ack.user;
} else {
return `${ack.name} ${ack.surname}`.trim();
}
}