Compare commits

..

No commits in common. 'main' and 'v1.6.2' have entirely different histories.
main ... v1.6.2

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

@ -11,9 +11,6 @@ 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',
@ -71,7 +68,7 @@ export const fetchTemplates = async (params) => {
'one_day_before_ending_the_trip_by_customer_relations',
'network_troubleshooting',
]
const canUseTemplates = (data?.result?.items || []).concat(leftItems)
const canUseTemplates = (data?.result?.items || [])
.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,27 +58,6 @@ 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 }), {})

@ -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('update') || ele.key.includes('info')) ? (
) : ele.key.includes('free') || ele.key.includes('detail') ? (
<Input.TextArea
key={`${ele.key}_${i}`}
rows={2}
@ -71,8 +71,7 @@ const CategoryList = ({ dataSource, handleSendTemplate, valueMapped, onInput, ac
className={` w-11/12 `}
size={'small'}
title={ele.key}
// ${paramsVal[ele.key] || ele.key}
placeholder={`按Tab键跳到下一个空格\n注意: 模板消息无法输入换行`}
placeholder={`${paramsVal[ele.key] || ele.key} 按Tab键跳到下一个空格\n注意: 模板消息无法输入换行`}
value={activeInput[tempItem.name]?.[ele.key] || paramsVal[ele.key] || ''}
// onPressEnter={() => handleSendTemplate(tempItem)}
/>

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

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

@ -88,14 +88,25 @@ function Profile() {
value: '+639454682947',
label: 'GH 客运(+639454682947)',
},
{
value: '+85265210895',
label: 'GH 客运 HK(+85265210895)',
},
{
value: '+8618174165365',
label: '国际事业部(+8618174165365)',
},
{
value: 'GH 客服',
label: 'GH 客服(无)',
disabled: true,
},
{
value: 'CT 事业部',
label: 'CT 事业部(无)',
disabled: true,
},
{
value: '花梨鹰事业部',
label: '花梨鹰事业部(无)',
disabled: true,
},
]}
/>
</Form.Item>

Loading…
Cancel
Save