Skip to content

Commit

Permalink
[FIX] Use correct room property for call ended at (#24932)
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinSchoeler committed Apr 7, 2022
1 parent 8891e21 commit 9c6c3aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down
2 changes: 0 additions & 2 deletions definition/IRoom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9c6c3aa

Please sign in to comment.