|
|
|
@ -13,7 +13,7 @@ export const fetchTemplates = async (params) => {
|
|
|
|
|
const data = await fetchJSON(`${API_HOST}/listtemplates`, params);
|
|
|
|
|
const canUseTemplates = (data?.result?.items || [])
|
|
|
|
|
.filter((_t) => _t.status === 'APPROVED' && !['say_hello_from_trip_advisor','free_style_7','free_style_1'].includes(_t.name))
|
|
|
|
|
.map((ele, i) => ({ ...ele, components_origin: ele.components, components: groupBy(ele.components, (_c) => _c.type.toLowerCase()), key:ele.name, displayName: ele.name.includes('specialist') ? `specialist_followup` : ele.name}));
|
|
|
|
|
.map((ele, i) => ({ ...ele, components_origin: ele.components, components: groupBy(ele.components, (_c) => _c.type.toLowerCase()), key:ele.name, displayName: templatesDisplayNameMap?.[ele.name] || ele.name}));
|
|
|
|
|
const topName = [
|
|
|
|
|
'order_updated_specialist_assigned_sharon',
|
|
|
|
|
'online_inquiry_received',
|
|
|
|
@ -34,6 +34,11 @@ export const fetchTemplates = async (params) => {
|
|
|
|
|
* order_updated_specialist_assigned_christy : free_style_1
|
|
|
|
|
* online_inquiry_received: say_hello_from_trip_advisor
|
|
|
|
|
*/
|
|
|
|
|
const templatesDisplayNameMap = {
|
|
|
|
|
'order_updated_specialist_assigned_sharon': 'specialist_followup',
|
|
|
|
|
'order_updated_specialist_assigned_christy': 'specialist_followup',
|
|
|
|
|
'online_inquiry_received': 'online_inquiry_received/say_hello',
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const CONVERSATION_PAGE_SIZE = 20;
|
|
|
|
|
/**
|
|
|
|
|