Skip to content

Commit

Permalink
Merge pull request #1079 from eclipse-tractusx/feature/962-fe-notific…
Browse files Browse the repository at this point in the history
…ation-model-change

chore(notification): 962 fix message direction
  • Loading branch information
ds-mwesener authored Jun 20, 2024
2 parents 45edbec + b6ecbc1 commit b39687c
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
********************************************************************************/

import { Component, Input } from '@angular/core';
import { environment } from '@env';
import { Notification, NotificationStatus } from '@shared/model/notification.model';

type TextMessageDirection = 'left' | 'right';
Expand Down Expand Up @@ -57,10 +58,9 @@ 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: createdBy === message.sentBy ? 'right' : 'left',
direction: environment.bpn === message.sentBy ? 'right' : 'left',
user: message.sentByName,
bpn: message.sentBy,
status: message.status,
Expand Down

0 comments on commit b39687c

Please sign in to comment.