From 1f7a3cdfd914b64323ba2ae9d0f83faabe6425ca Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Thu, 20 Jun 2024 13:49:06 +0200 Subject: [PATCH 1/2] chore(notification): 962 fix message direction --- .../notification-reason/notification-reason.component.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/modules/shared/components/notification-reason/notification-reason.component.ts b/frontend/src/app/modules/shared/components/notification-reason/notification-reason.component.ts index b5ec03c595..f9e106b6a4 100644 --- a/frontend/src/app/modules/shared/components/notification-reason/notification-reason.component.ts +++ b/frontend/src/app/modules/shared/components/notification-reason/notification-reason.component.ts @@ -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'; @@ -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, From b6ecbc1d59af972ae23a2ff1c7240753669fefb0 Mon Sep 17 00:00:00 2001 From: Martin Maul Date: Thu, 20 Jun 2024 13:51:58 +0200 Subject: [PATCH 2/2] chore(notification): 962 fix message direction --- .../notification-reason/notification-reason.component.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/frontend/src/app/modules/shared/components/notification-reason/notification-reason.component.ts b/frontend/src/app/modules/shared/components/notification-reason/notification-reason.component.ts index f9e106b6a4..5f4a1b2083 100644 --- a/frontend/src/app/modules/shared/components/notification-reason/notification-reason.component.ts +++ b/frontend/src/app/modules/shared/components/notification-reason/notification-reason.component.ts @@ -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 => { - console.log(environment.bpn); this.textMessages.push({ message: message.message, direction: environment.bpn === message.sentBy ? 'right' : 'left',