chore: change date formatting in Omnichannel Contact Center (#40025)

Co-authored-by: cubic-dev-ai[bot] <191113872+cubic-dev-ai[bot]@users.noreply.github.com>
pull/40052/head
Júlia Jaeger Foresti 2 months ago committed by GitHub
parent 8ebf44bf53
commit 88fb1e581c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 10
      apps/meteor/client/views/omnichannel/directory/chats/ChatsTable/ChatsTableRow.tsx

@ -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';
@ -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');
@ -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)}

Loading…
Cancel
Save