Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';

import RemoveChatButton from './RemoveChatButton';
import { OmnichannelRoomIcon } from '../../../../../components/RoomIcon/OmnichannelRoomIcon';
import { useFormatDate } from '../../../../../hooks/useFormatDate';
import { useTimeFromNow } from '../../../../../hooks/useTimeFromNow';
import OmnichannelVerificationTag from '../../../components/OmnichannelVerificationTag';
import RoomActivityIcon from '../../../components/RoomActivityIcon';
Expand All @@ -20,6 +21,7 @@ const ChatsTableRow = (room: IOmnichannelRoomWithDepartment) => {
const { _id, fname, tags, servedBy, ts, department, open, priorityWeight, lm, onHold, source, verified } = room;
const { enabled: isPriorityEnabled } = useOmnichannelPriorities();
const getTimeFromNow = useTimeFromNow(true);
const formatDate = useFormatDate();
const { getSourceLabel } = useOmnichannelSource();

const canRemoveClosedChats = usePermission('remove-closed-livechat-room');
Expand Down Expand Up @@ -81,8 +83,12 @@ const ChatsTableRow = (room: IOmnichannelRoomWithDepartment) => {
</Box>
</GenericTableCell>
<GenericTableCell withTruncatedText>{department?.name}</GenericTableCell>
<GenericTableCell withTruncatedText>{getTimeFromNow(ts)}</GenericTableCell>
<GenericTableCell withTruncatedText>{getTimeFromNow(lm)}</GenericTableCell>
<GenericTableCell withTruncatedText title={getTimeFromNow(ts)}>
{formatDate(ts)}
</GenericTableCell>
<GenericTableCell withTruncatedText title={lm ? getTimeFromNow(lm) : undefined}>
{lm ? formatDate(lm) : undefined}
</GenericTableCell>
<GenericTableCell withTruncatedText>
<RoomActivityIcon room={room} />
{getStatusText(open, onHold)}
Expand Down
Loading