Skip to content

Commit 88fb1e5

Browse files
chore: change date formatting in Omnichannel Contact Center (RocketChat#40025)
Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
1 parent 8ebf44b commit 88fb1e5

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTableRow.tsx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next';
77

88
import RemoveChatButton from './RemoveChatButton';
99
import { OmnichannelRoomIcon } from '../../../../../components/RoomIcon/OmnichannelRoomIcon';
10+
import { useFormatDate } from '../../../../../hooks/useFormatDate';
1011
import { useTimeFromNow } from '../../../../../hooks/useTimeFromNow';
1112
import OmnichannelVerificationTag from '../../../components/OmnichannelVerificationTag';
1213
import RoomActivityIcon from '../../../components/RoomActivityIcon';
@@ -20,6 +21,7 @@ const ChatsTableRow = (room: IOmnichannelRoomWithDepartment) => {
2021
const { _id, fname, tags, servedBy, ts, department, open, priorityWeight, lm, onHold, source, verified } = room;
2122
const { enabled: isPriorityEnabled } = useOmnichannelPriorities();
2223
const getTimeFromNow = useTimeFromNow(true);
24+
const formatDate = useFormatDate();
2325
const { getSourceLabel } = useOmnichannelSource();
2426

2527
const canRemoveClosedChats = usePermission('remove-closed-livechat-room');
@@ -81,8 +83,12 @@ const ChatsTableRow = (room: IOmnichannelRoomWithDepartment) => {
8183
</Box>
8284
</GenericTableCell>
8385
<GenericTableCell withTruncatedText>{department?.name}</GenericTableCell>
84-
<GenericTableCell withTruncatedText>{getTimeFromNow(ts)}</GenericTableCell>
85-
<GenericTableCell withTruncatedText>{getTimeFromNow(lm)}</GenericTableCell>
86+
<GenericTableCell withTruncatedText title={getTimeFromNow(ts)}>
87+
{formatDate(ts)}
88+
</GenericTableCell>
89+
<GenericTableCell withTruncatedText title={lm ? getTimeFromNow(lm) : undefined}>
90+
{lm ? formatDate(lm) : undefined}
91+
</GenericTableCell>
8692
<GenericTableCell withTruncatedText>
8793
<RoomActivityIcon room={room} />
8894
{getStatusText(open, onHold)}

0 commit comments

Comments
 (0)