Compare commits

...

14 Commits
v1.6.1 ... main

Author SHA1 Message Date
Lei OT 517d2deed2 1.6.7 2 days ago
Lei OT 7193b62821 perf: 获取更多模板 2 days ago
LiaoYijun 98aec9b037 1.6.6 1 month ago
Lei OT a3ef048865 + 客运新的商业号 1 month ago
LiaoYijun ea00e7d2fd 1.6.5 1 month ago
LiaoYijun c600958384 feat: 增加客运香港号码 1 month ago
LiaoYijun 576532ebe6 1.6.4 1 month ago
LiaoYijun 7769929d00 fix:马币不支持跨境付款 1 month ago
Lei OT f1eb47c17f 1.6.3 2 months ago
Lei OT a9c4c71921 perf: 模板显示 2 months ago
Lei OT 4afa544641 邮件发送: actionID 2 months ago
Lei OT 78f10715e7 1.6.2 3 months ago
Lei OT 144abacf90 perf: 模板提示 3 months ago
Lei OT 96a050afa9 perf: 会话页面: 短链接按钮 3 months ago

@ -1,7 +1,7 @@
{
"name": "global-sales",
"private": true,
"version": "1.6.1",
"version": "1.6.7",
"type": "module",
"scripts": {
"dev": "vite",

@ -11,6 +11,9 @@ import dayjs from 'dayjs';
*/
export const fetchTemplates = async (params) => {
const data = await fetchJSON(`${API_HOST}/listtemplates`, params);
const leftPageCnt = Math.ceil( data?.result?.total/100 || 0)-1;
const leftData = await Promise.all(Array.from({ length: leftPageCnt }, (_, i) => fetchJSON(`${API_HOST}/listtemplates`, {...params, page: i+2})));
const leftItems = leftData.map(item => item.result.items).flat();
const topName = [
'agent_intro_with_update_v1',
'online_inquiry_received',
@ -68,7 +71,7 @@ export const fetchTemplates = async (params) => {
'one_day_before_ending_the_trip_by_customer_relations',
'network_troubleshooting',
]
const canUseTemplates = (data?.result?.items || [])
const canUseTemplates = (data?.result?.items || []).concat(leftItems)
.filter((_t) => _t.status === 'APPROVED' && !['say_hello_from_trip_advisor', 'free_style_7', 'free_style_1', 'free_style_2'].includes(_t.name))
.map((ele, i) => ({
...ele,

@ -58,6 +58,27 @@ export const WABAccounts = [
"requestedVerifiedName": "Customer Relation Specialist",
"rejectionReason": "NONE"
},
{
"id": "955633124303178",
"phoneNumber": "+85265210895",
"wabaId": "190290134156880",
"verifiedName": "Customer Relation Specialist at Highlights",
"qualityRating": "UNKNOWN",
"qualityUpdateEvent": "ONBOARDING",
"messagingLimit": "TIER_2K",
"whatsappBusinessManagerMessagingLimit": "TIER_2K",
"isOfficialBusinessAccount": false,
"codeVerificationStatus": "VERIFIED",
"status": "CONNECTED",
"displayPhoneNumber": "+852 6521 0895",
"nameStatus": "APPROVED",
"newName": "Customer Relation Specialist at Highlights",
"newNameStatus": "NONE",
"decision": "APPROVED",
"requestedVerifiedName": "Customer Relation Specialist at Highlights",
"rejectionReason": "NONE",
"isOnBizApp": false
},
];
export const WABAccountsMapped = WABAccounts.reduce((a, c) => ({ ...a, [removeFirstPlus(c.phoneNumber)]: c, [c.phoneNumber]: c }), {})

@ -6,9 +6,9 @@ import ShorturlConversion from '@/views/accounts/ShorturlConversion'
const GenerateShorturlDrawer = ({ ...props }) => {
const [openShorturlDrawer, closeShorturlDrawer, shorturlDrawerOpen] = useUrlStore((state) => [state.openDrawer, state.closeDrawer, state.drawerOpen])
return (
<Drawer title='短链接转换' placement={'top'} size={'large'} onClose={() => closeShorturlDrawer()} open={shorturlDrawerOpen}>
<Drawer title='短链接转换' placement={'top'} onClose={() => closeShorturlDrawer()} open={shorturlDrawerOpen}>
<ShorturlConversion/>
</Drawer>
)
}
export default GenerateShorturlDrawer
export default GenerateShorturlDrawer

@ -7,6 +7,7 @@ import PaymentlinkBtn from './PaymentlinkBtn'
import SnippestBtn from './SnippestBtn'
import useConversationStore from '@/stores/ConversationStore'
import { isEmpty } from '@haina/utils-commons'
import ShortlinkBtn from './ShortlinkBtn'
const ComposerTools = ({ channel, invokeSendUploadMessage, invokeSendMessage, invokeUploadFileMessage, inputEmoji, ...props }) => {
const websocket = useConversationStore((state) => state.websocket)
@ -25,6 +26,7 @@ const ComposerTools = ({ channel, invokeSendUploadMessage, invokeSendMessage, in
<PaymentlinkBtn />
<SnippestBtn />
<ShortlinkBtn />
{/* <Button type='text' className='' icon={<YoutubeOutlined />} size={'middle'} />
<Button type='text' className='' icon={<AudioOutlined />} size={'middle'} /> */}

@ -0,0 +1,24 @@
import { createContext, useEffect, useState } from 'react'
import { Tooltip, Button } from 'antd'
import useUrlStore from '@/stores/UrlStore'
const ShortlinkBtn = ({ type, ...props }) => {
const [openShorturlDrawer] = useUrlStore((state) => [state.openDrawer])
return (
<>
<Tooltip title='短链接'>
{type === 'link' ? (
<Button type={'link'} onClick={() => openShorturlDrawer()}>
短链接
</Button>
) : (
<Button type='text' onClick={() => openShorturlDrawer()} size={'middle'} className='px-1'>
🔗
</Button>
)}
</Tooltip>
</>
)
}
export default ShortlinkBtn

@ -61,7 +61,7 @@ const CategoryList = ({ dataSource, handleSendTemplate, valueMapped, onInput, ac
<span key={ele.trim()} className=' text-wrap'>
{ele.replace(/\n+/g, '\n')}
</span>
) : ele.key.includes('free') || ele.key.includes('detail') ? (
) : (ele.key.includes('free') || ele.key.includes('detail') || ele.key.includes('update') || ele.key.includes('info')) ? (
<Input.TextArea
key={`${ele.key}_${i}`}
rows={2}
@ -71,7 +71,8 @@ const CategoryList = ({ dataSource, handleSendTemplate, valueMapped, onInput, ac
className={` w-11/12 `}
size={'small'}
title={ele.key}
placeholder={`${paramsVal[ele.key] || ele.key} 按Tab键跳到下一个空格\n注意: 模板消息无法输入换行`}
// ${paramsVal[ele.key] || ele.key}
placeholder={`按Tab键跳到下一个空格\n注意: 模板消息无法输入换行`}
value={activeInput[tempItem.name]?.[ele.key] || paramsVal[ele.key] || ''}
// onPressEnter={() => handleSendTemplate(tempItem)}
/>
@ -168,7 +169,7 @@ const CategoryList = ({ dataSource, handleSendTemplate, valueMapped, onInput, ac
</Tag>
{/* <Tag style={{...TagColorStyle(item.category.toUpperCase(), true)}}>{templateCaterogyText[item.category]}</Tag> */}
{templateCaterogyTipText[item.category] && <Tag style={{ ...TagColorStyle(item.category.toUpperCase(), true) }}>{templateCaterogyTipText[item.category]}</Tag>}
{templateCaterogyTipText2[item.category] && <Tag style={{ ...TagColorStyle(templateCaterogyTipText2[item.category].toUpperCase(), true) }}>{templateCaterogyTipText2[item.category]}</Tag>}
{/* {templateCaterogyTipText2[item.category] && <Tag style={{ ...TagColorStyle(templateCaterogyTipText2[item.category].toUpperCase(), true) }}>{templateCaterogyTipText2[item.category]}</Tag>} */}
</span>
<Button onClick={() => handleSendTemplate(item)} size={'small'} type='link' key={'send'} icon={<SendOutlined />}>
Send

@ -525,6 +525,7 @@ const NewEmail = () => {
})
// body.externalID = stickToCid
// body.actionID = `${stickToCid}.${msgObj.id}`
body.actionID = `0.${uuid()}`
body.contenttype = isRichText ? 'text/html' : 'text/plain'
try {

@ -155,7 +155,6 @@ function GeneratePayment() {
{ value: 'SGD', label: '新加坡元' },
{ value: 'NZD', label: '新西兰元' },
{ value: 'THB', label: '泰铢' },
{ value: 'MYR', label: '马币' },
]}></Select>
</Form.Item>
}

@ -89,23 +89,12 @@ function Profile() {
label: 'GH 客运(+639454682947)',
},
{
value: '+8618174165365',
label: '国际事业部(+8618174165365)',
},
{
value: 'GH 客服',
label: 'GH 客服(无)',
disabled: true,
value: '+85265210895',
label: 'GH 客运 HK(+85265210895)',
},
{
value: 'CT 事业部',
label: 'CT 事业部(无)',
disabled: true,
},
{
value: '花梨鹰事业部',
label: '花梨鹰事业部(无)',
disabled: true,
value: '+8618174165365',
label: '国际事业部(+8618174165365)',
},
]}
/>

Loading…
Cancel
Save