Skip to content

Commit

Permalink
chore(notification): 962 fix message direction
Browse files Browse the repository at this point in the history
  • Loading branch information
ds-mmaul committed Jun 20, 2024
1 parent 206903c commit 1f7a3cd
Showing 1 changed file with 3 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,10 @@ export class NotificationReasonComponent {
const sortedMessagesAfterDates = messages.sort((a, b) => new Date(a.messageDate).valueOf() - new Date(b.messageDate).valueOf());

sortedMessagesAfterDates.forEach(message => {

console.log(environment.bpn);
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 1f7a3cd

Please sign in to comment.