From 9c6c3aafcb7c4aabdf6b1092ffda0440bb2d14bd Mon Sep 17 00:00:00 2001 From: Martin Schoeler Date: Thu, 7 Apr 2022 10:58:05 -0300 Subject: [PATCH] [FIX] Use correct room property for call ended at (#24932) --- .../omnichannel/directory/calls/contextualBar/VoipInfo.tsx | 4 ++-- definition/IRoom.ts | 2 -- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/client/views/omnichannel/directory/calls/contextualBar/VoipInfo.tsx b/client/views/omnichannel/directory/calls/contextualBar/VoipInfo.tsx index e79c340f5a93..e64db83dbf86 100644 --- a/client/views/omnichannel/directory/calls/contextualBar/VoipInfo.tsx +++ b/client/views/omnichannel/directory/calls/contextualBar/VoipInfo.tsx @@ -22,11 +22,11 @@ type VoipInfoPropsType = { export const VoipInfo = ({ room, onClickClose /* , onClickReport, onClickCall */ }: VoipInfoPropsType): ReactElement => { const t = useTranslation(); - const { servedBy, queue, v, fname, name, callDuration, callTotalHoldTime, callEndedAt, callWaitingTime, tags, lastMessage } = room; + const { servedBy, queue, v, fname, name, callDuration, callTotalHoldTime, closedAt, callWaitingTime, tags, lastMessage } = room; const duration = callDuration && moment.utc(callDuration).format('HH:mm:ss'); const waiting = callWaitingTime && moment.utc(callWaitingTime).format('HH:mm:ss'); const hold = callTotalHoldTime && moment.utc(callTotalHoldTime).format('HH:mm:ss'); - const endedAt = callEndedAt && moment(callEndedAt).format('LLL'); + const endedAt = closedAt && moment(closedAt).format('LLL'); const phoneNumber = Array.isArray(v?.phone) ? v?.phone[0]?.phoneNumber : v?.phone; const shouldShowWrapup = useMemo(() => lastMessage?.t === 'voip-call-wrapup' && lastMessage?.msg, [lastMessage]); const shouldShowTags = useMemo(() => tags && tags.length > 0, [tags]); diff --git a/definition/IRoom.ts b/definition/IRoom.ts index c65340878d36..9b9885898625 100644 --- a/definition/IRoom.ts +++ b/definition/IRoom.ts @@ -194,8 +194,6 @@ export interface IVoipRoom extends IOmnichannelGenericRoom { callDuration?: number; // The amount of time call was in queue in milliseconds callWaitingTime?: number; - // The time when call was ended - callEndedAt?: Date; // The total of hold time for call (calculated at closing time) in seconds callTotalHoldTime?: number; // The pbx queue the call belongs to