|
|
@ -1,11 +1,12 @@
|
|
|
|
import { createContext, useEffect, useState, memo } from 'react';
|
|
|
|
import { memo } from 'react';
|
|
|
|
import { Button } from 'antd';
|
|
|
|
import { App } from 'antd';
|
|
|
|
import { MailFilled, MailOutlined, WhatsAppOutlined } from '@ant-design/icons';
|
|
|
|
import { MailOutlined } from '@ant-design/icons';
|
|
|
|
import { MessageBox } from 'react-chat-elements';
|
|
|
|
import { MessageBox } from 'react-chat-elements';
|
|
|
|
import { groupBy, isEmpty, } from '@/utils/commons';
|
|
|
|
import { isEmpty, } from '@/utils/commons';
|
|
|
|
// import { } from '@/actions/EmailActions';
|
|
|
|
import { useEmailDetail, } from '@/hooks/useEmail';
|
|
|
|
|
|
|
|
|
|
|
|
const BubbleEmail = ({ onOpenEditor, onOpenEmail, ...message }) => {
|
|
|
|
const BubbleEmail = ({ onOpenEditor, onOpenEmail, ...message }) => {
|
|
|
|
|
|
|
|
const { notification } = App.useApp()
|
|
|
|
|
|
|
|
|
|
|
|
const RenderText = memo(function renderText({ className, email, sender }) {
|
|
|
|
const RenderText = memo(function renderText({ className, email, sender }) {
|
|
|
|
return (
|
|
|
|
return (
|
|
|
@ -25,8 +26,22 @@ const BubbleEmail = ({ onOpenEditor, onOpenEmail, ...message }) => {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const { postEmailResend } = useEmailDetail()
|
|
|
|
const handleResend = async (emailMsgContent) => {
|
|
|
|
const handleResend = async (emailMsgContent) => {
|
|
|
|
// const result = await postResendEmail({ id: emailMsgContent.id, actionId: emailMsgContent.actionId });
|
|
|
|
if (isEmpty((emailMsgContent.mai_sn || emailMsgContent.id))) {
|
|
|
|
|
|
|
|
return false
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
// debug: mai_sn: emailMsgContent.mai_sn
|
|
|
|
|
|
|
|
await postEmailResend({ mai_sn: 5066519, conversationid: message.conversationid, actionId: emailMsgContent.actionId })
|
|
|
|
|
|
|
|
} catch (err) {
|
|
|
|
|
|
|
|
notification.error({
|
|
|
|
|
|
|
|
message: "请求失败",
|
|
|
|
|
|
|
|
description: err.message,
|
|
|
|
|
|
|
|
placement: "top",
|
|
|
|
|
|
|
|
duration: 3,
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
return (
|
|
|
|
return (
|
|
|
|
<MessageBox
|
|
|
|
<MessageBox
|
|
|
|