|
|
|
@ -2,7 +2,7 @@ import { useEffect, useState, useRef } from 'react';
|
|
|
|
|
import { useParams, useNavigate, useLocation } from 'react-router-dom';
|
|
|
|
|
import { Dropdown, Input, Button, Empty, Tooltip } from 'antd';
|
|
|
|
|
import { PlusOutlined, WhatsAppOutlined, LoadingOutlined, HistoryOutlined, FireOutlined } from '@ant-design/icons';
|
|
|
|
|
import { fetchConversationsList, fetchOrderConversationsList, fetchConversationItemClose, postNewConversationItem } from '@/actions/ConversationActions';
|
|
|
|
|
import { fetchConversationsList, fetchOrderConversationsList, fetchConversationItemClose, fetchConversationsSearch, postNewConversationItem } from '@/actions/ConversationActions';
|
|
|
|
|
import { ChatItem } from 'react-chat-elements';
|
|
|
|
|
import ConversationsNewItem from './ConversationsNewItem';
|
|
|
|
|
import { isEmpty, olog } from '@/utils/commons';
|
|
|
|
@ -29,6 +29,7 @@ const Conversations = ({ mobile }) => {
|
|
|
|
|
const delConversationitem = useConversationStore((state) => state.delConversationitem);
|
|
|
|
|
|
|
|
|
|
const closedConversationsList = useConversationStore((state) => state.closedConversationsList);
|
|
|
|
|
const setClosedConversationList = useConversationStore((state) => state.setClosedConversationList);
|
|
|
|
|
|
|
|
|
|
const isVisible = useVisibilityState();
|
|
|
|
|
|
|
|
|
@ -133,6 +134,8 @@ const Conversations = ({ mobile }) => {
|
|
|
|
|
if (String(order_sn) === String(item.coli_sn)) {
|
|
|
|
|
navigate(routePrefix, { replace: routerReplace });
|
|
|
|
|
}
|
|
|
|
|
const _clist = await fetchConversationsSearch({ opisn: userId, session_enable: 0 });
|
|
|
|
|
setClosedConversationList(_clist);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
const searchInputRef = useRef(null);
|
|
|
|
|