Skip to content

Commit

Permalink
Merge pull request #1102 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 61ed31a + a2f4cd4 commit 4b4beec
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</section>

<ng-template #chatBubble let-message="message" let-lastDate="lastDate" let-isFirst="isFirst">
<ng-container *ngIf="message?.message?.length">
<ng-container>
<div class="message--separator" *ngIf="isFirst || (!isFirst && lastDate && !isSameDay(lastDate, message.date))">
{{ message.date | date:'mediumDate' }}
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ export class NotificationReasonComponent {
const sortedMessagesAfterDates = messages.sort((a, b) => new Date(a.messageDate).valueOf() - new Date(b.messageDate).valueOf());

sortedMessagesAfterDates.forEach(message => {
if (message?.message?.length > 0) {
this.textMessages.push({
message: message.message,
direction: environment.bpn === message.sentBy ? 'right' : 'left',
Expand All @@ -68,7 +67,6 @@ export class NotificationReasonComponent {
date: message.messageDate,
errorMessage: message.errorMessage,
});
}
});

}
Expand Down

0 comments on commit 4b4beec

Please sign in to comment.