|
|
|
@ -1,10 +1,9 @@
|
|
|
|
|
import { memo, useCallback, useEffect, useRef, useState, forwardRef } from 'react';
|
|
|
|
|
import { Divider, Button, Input, Layout, Select, DatePicker, Form, List, Spin } from 'antd';
|
|
|
|
|
import { Divider, Button, Input, Layout, DatePicker, Form, List, Spin } from 'antd';
|
|
|
|
|
import { ChatItem, MessageBox } from 'react-chat-elements';
|
|
|
|
|
import { fetchConversationsList, fetchMessages, MESSAGE_PAGE_SIZE } from '@/actions/ConversationActions';
|
|
|
|
|
import { isEmpty } from '@/utils/utils';
|
|
|
|
|
import { isEmpty, stringToColour } from '@/utils/utils';
|
|
|
|
|
import useFormStore from '@/stores/FormStore';
|
|
|
|
|
import { useShallow } from 'zustand/react/shallow';
|
|
|
|
|
|
|
|
|
|
import { fetchSalesAgent, fetchCustomerList } from '@/actions/CommonActions';
|
|
|
|
|
import SearchInput from '@/components/SearchInput';
|
|
|
|
@ -253,7 +252,7 @@ function ChatHistory() {
|
|
|
|
|
: {})}
|
|
|
|
|
renderAddCmp={
|
|
|
|
|
<div className='border-dashed border-0 border-t border-slate-300 text-slate-600 space-x-2 emoji'>
|
|
|
|
|
<span>{message.senderName}</span>
|
|
|
|
|
<span className={`p-1 rounded-b ${message.msg_direction === 'outbound' ? 'text-white' : ''} `} style={{backgroundColor: message.msg_direction === 'outbound' ? stringToColour(message.senderName) : 'unset'}}>{message.senderName}</span>
|
|
|
|
|
<span>{message.dateString || message.localDate}</span>
|
|
|
|
|
<span>{message.statusCN}</span>
|
|
|
|
|
</div>
|
|
|
|
|