|
|
|
@ -1,7 +1,7 @@
|
|
|
|
|
import { useState, useEffect, useCallback } from 'react'
|
|
|
|
|
import { isEmpty, objectMapper, olog, } from '@/utils/commons'
|
|
|
|
|
import { readIndexDB } from '@/utils/indexedDB'
|
|
|
|
|
import { getEmailDetailAction, postResendEmailAction, getSalesSignatureAction, getEmailOrderAction, queryEmailListAction, getEmailTemplateAction, saveEmailDraftOrSendAction, updateEmailAction, getEmailChangesChannel, EMAIL_CHANNEL_NAME } from '@/actions/EmailActions'
|
|
|
|
|
import { getEmailDetailAction, postResendEmailAction, getSalesSignatureAction, getEmailOrderAction, queryEmailListAction, getReminderEmailTemplateAction, saveEmailDraftOrSendAction, updateEmailAction, getEmailChangesChannel, EMAIL_CHANNEL_NAME } from '@/actions/EmailActions'
|
|
|
|
|
import { App } from 'antd'
|
|
|
|
|
import useConversationStore from '@/stores/ConversationStore';
|
|
|
|
|
import { msgStatusRenderMapped } from '@/channel/bubbleMsgUtils';
|
|
|
|
@ -375,7 +375,7 @@ export const useEmailTemplate = (templateKey, params) => {
|
|
|
|
|
try {
|
|
|
|
|
const { index: remind_index, type: remind_type } = emailTemplateMap[templateKey] || {};
|
|
|
|
|
const _params = { ...params, remind_index, remind_type};
|
|
|
|
|
const x = await getEmailTemplateAction(_params)
|
|
|
|
|
const x = await getReminderEmailTemplateAction(_params)
|
|
|
|
|
const lowerCaseShallow = Object.keys(x).reduce((acc, key) => ({...acc, [key.toLowerCase()]: x[key]}), {})
|
|
|
|
|
setTemplateContent({...lowerCaseShallow, mailtypeName: orderMailTypes.get(lowerCaseShallow.mailtype)})
|
|
|
|
|
} catch (networkError) {
|
|
|
|
|