|
|
|
@ -1,7 +1,8 @@
|
|
|
|
|
import { useEffect, useState, useRef } from 'react';
|
|
|
|
|
import { useParams, useNavigate, useLocation } from 'react-router-dom';
|
|
|
|
|
import { Dropdown, Input } from 'antd';
|
|
|
|
|
import { fetchOrderConversationsList, fetchConversationItemClose, } from '@/actions/ConversationActions';
|
|
|
|
|
import { Dropdown, Input, Button, } from 'antd';
|
|
|
|
|
import { PlusOutlined, WhatsAppOutlined, } from '@ant-design/icons';
|
|
|
|
|
import { fetchOrderConversationsList, fetchConversationItemClose, postNewConversationItem } from '@/actions/ConversationActions';
|
|
|
|
|
import { ChatItem } from 'react-chat-elements';
|
|
|
|
|
import { isEmpty } from '@/utils/utils';
|
|
|
|
|
import useConversationStore from '@/stores/ConversationStore';
|
|
|
|
@ -189,11 +190,12 @@ const Conversations = ({ mobile }) => {
|
|
|
|
|
subtitle={item.coli_id}
|
|
|
|
|
date={item.last_received_time}
|
|
|
|
|
unread={item.unread_msg_count}
|
|
|
|
|
className={
|
|
|
|
|
[String(item.sn) === String(currentConversation.sn) ? '__active text-primary bg-whatsapp-bg' : '',
|
|
|
|
|
String(item.sn) === String(tabSelectedConversation?.sn) ? ' bg-neutral-200' : ''
|
|
|
|
|
].join(' ')
|
|
|
|
|
}
|
|
|
|
|
className={[
|
|
|
|
|
String(item.sn) === String(currentConversation.sn) ? '__active text-primary bg-whatsapp-bg' : '',
|
|
|
|
|
String(item.sn) === String(tabSelectedConversation?.sn) ? ' bg-neutral-200' : '',
|
|
|
|
|
].join(' ')}
|
|
|
|
|
statusText={<WhatsAppOutlined key={'channel'} className='text-whatsapp' />}
|
|
|
|
|
statusColor={'#fff'}
|
|
|
|
|
onClick={() => onSwitchConversation(item)}
|
|
|
|
|
/>
|
|
|
|
|
</Dropdown>
|
|
|
|
|