Skip to content

Commit

Permalink
Merge pull request #1095 from eclipse-tractusx/chore/753-update-notif…
Browse files Browse the repository at this point in the history
…ication-message-history

chore(messages): 753 correctly display messages
  • Loading branch information
ds-mwesener authored Jun 24, 2024
2 parents 3d6b68d + d5cfbcd commit a02f407
Showing 1 changed file with 11 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,15 +58,17 @@ export class NotificationReasonComponent {
const sortedMessagesAfterDates = messages.sort((a, b) => new Date(a.messageDate).valueOf() - new Date(b.messageDate).valueOf());

sortedMessagesAfterDates.forEach(message => {
this.textMessages.push({
message: message.message,
direction: environment.bpn === message.sentBy ? 'right' : 'left',
user: message.sentByName,
bpn: message.sentBy,
status: message.status,
date: message.messageDate,
errorMessage: message.errorMessage,
});
if (message?.message?.length > 0) {
this.textMessages.push({
message: message.message,
direction: environment.bpn === message.sentBy ? 'right' : 'left',
user: message.sentByName,
bpn: message.sentBy,
status: message.status,
date: message.messageDate,
errorMessage: message.errorMessage,
});
}
});

}
Expand Down

0 comments on commit a02f407

Please sign in to comment.