|
|
|
@ -12,7 +12,7 @@ import { EditIcon } from '@/components/Icons'
|
|
|
|
|
const EmailNewBtn = ({ ...props }) => {
|
|
|
|
|
const [mobile] = useStyleStore((state) => [state.mobile])
|
|
|
|
|
|
|
|
|
|
const { userId, username, emailList } = useAuthStore((state) => state.loginUser)
|
|
|
|
|
const { userId, username, emailList, email } = useAuthStore((state) => state.loginUser)
|
|
|
|
|
// const websocketOpened = useConversationStore((state) => state.websocketOpened);
|
|
|
|
|
const currentConversation = useConversationStore((state) => state.currentConversation)
|
|
|
|
|
// const talkabled = !isEmpty(currentConversation.sn) && websocketOpened;
|
|
|
|
@ -20,7 +20,7 @@ const EmailNewBtn = ({ ...props }) => {
|
|
|
|
|
|
|
|
|
|
const emailListOption = emailList?.map((ele) => ({ ...ele, label: ele.email, key: ele.email, value: ele.email })) || []
|
|
|
|
|
|
|
|
|
|
const [pickEmail, setPickEmail] = useState({})
|
|
|
|
|
const [pickEmail, setPickEmail] = useState({ key: email, email })
|
|
|
|
|
const [fromUser, setFromUser] = useState()
|
|
|
|
|
|
|
|
|
|
useEffect(() => {
|
|
|
|
@ -32,7 +32,8 @@ const EmailNewBtn = ({ ...props }) => {
|
|
|
|
|
emailListOption?.find((ele) => ele.opi_sn === order_opi && ele.backup === true) ||
|
|
|
|
|
emailListOption?.find((ele) => ele.opi_sn === order_opi) ||
|
|
|
|
|
emailListOption?.find((ele) => ele.default === true) ||
|
|
|
|
|
emailListOption?.find((ele) => ele.backup === true)
|
|
|
|
|
emailListOption?.find((ele) => ele.backup === true) ||
|
|
|
|
|
emailListOption[0]
|
|
|
|
|
setPickEmail(find)
|
|
|
|
|
return () => {}
|
|
|
|
|
}, [orderDetail])
|
|
|
|
|