|
|
|
@ -23,6 +23,12 @@ export const fetchTemplates = async (params) => {
|
|
|
|
'first_message_for_not_reply',
|
|
|
|
'first_message_for_not_reply',
|
|
|
|
// 'free_style_3',
|
|
|
|
// 'free_style_3',
|
|
|
|
// 'free_style_4',
|
|
|
|
// 'free_style_4',
|
|
|
|
|
|
|
|
// CR
|
|
|
|
|
|
|
|
'notification_of_following_up_by_cr_v3','notification_of_following_up_by_cr_v1',
|
|
|
|
|
|
|
|
'notification_of_following_up_by_cr_v2',
|
|
|
|
|
|
|
|
'membership_activation_update_by_cr_v1', '45d_before_the_trip_referral_voucher_by_cr_v0',
|
|
|
|
|
|
|
|
'membership_activation_update_by_cr_v0',
|
|
|
|
|
|
|
|
'departure_reminder_by_cr_v5','departure_reminder_by_cr_v2',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
// shouwcase
|
|
|
|
// shouwcase
|
|
|
|
const scNames = ['trip_planner_showcase', 'showcase_different', 'order_status_updated'];
|
|
|
|
const scNames = ['trip_planner_showcase', 'showcase_different', 'order_status_updated'];
|
|
|
|
@ -37,6 +43,13 @@ export const fetchTemplates = async (params) => {
|
|
|
|
'one_day_before_ending_the_trip_contacted_by_yuni','one_day_before_ending_the_trip_first_time_by_yuni',
|
|
|
|
'one_day_before_ending_the_trip_contacted_by_yuni','one_day_before_ending_the_trip_first_time_by_yuni',
|
|
|
|
'post_booking_confirmation_welcome',
|
|
|
|
'post_booking_confirmation_welcome',
|
|
|
|
];
|
|
|
|
];
|
|
|
|
|
|
|
|
const crNamesAuto = [
|
|
|
|
|
|
|
|
'notification_of_status_changed', 'notification_of_next_trip_planning_by_cr_v2',
|
|
|
|
|
|
|
|
'notification_of_payment_received_3_asea_by_cr', 'one_day_after_payment_by_yuni',
|
|
|
|
|
|
|
|
'30_days_after_end_of_the_trip_asean_referral_voucher_by_cr',
|
|
|
|
|
|
|
|
'7notification_of_one_day_before_ending_the_trip_only_asean_by_cr_v7',
|
|
|
|
|
|
|
|
'notification_of_one_day_before_ending_the_trip_by_cr_v2',
|
|
|
|
|
|
|
|
];
|
|
|
|
const crNamesOmit = [
|
|
|
|
const crNamesOmit = [
|
|
|
|
'birthday_greetings_by_marketing','one_day_before_ending_the_trip_by_marketing',
|
|
|
|
'birthday_greetings_by_marketing','one_day_before_ending_the_trip_by_marketing',
|
|
|
|
'introduce_the_voucher_one_day_before_ending_the_trip_by_marketing',
|
|
|
|
'introduce_the_voucher_one_day_before_ending_the_trip_by_marketing',
|
|
|
|
@ -62,7 +75,15 @@ export const fetchTemplates = async (params) => {
|
|
|
|
key: ele.name,
|
|
|
|
key: ele.name,
|
|
|
|
// displayName: ele.name.startsWith('order_updated') ? templatesDisplayNameMap['order_updated']+`_${i}` : templatesDisplayNameMap?.[ele.name] || ele.name,
|
|
|
|
// displayName: ele.name.startsWith('order_updated') ? templatesDisplayNameMap['order_updated']+`_${i}` : templatesDisplayNameMap?.[ele.name] || ele.name,
|
|
|
|
displayName: templatesDisplayNameMap?.[ele.name] || (ele.name.startsWith('order_updated') ? templatesDisplayNameMap['order_updated'] + `_${i}` : ele.name),
|
|
|
|
displayName: templatesDisplayNameMap?.[ele.name] || (ele.name.startsWith('order_updated') ? templatesDisplayNameMap['order_updated'] + `_${i}` : ele.name),
|
|
|
|
displayLanguage: crNamesOmit.includes(ele.name) ? '客运-' : (crNames.includes(ele.name) || ele.name.includes('by_cr')) ? ele.language + '-客运' : scNames.includes(ele.name) ? ele.language + '-示例' : ele.language,
|
|
|
|
displayLanguage: crNamesOmit.includes(ele.name)
|
|
|
|
|
|
|
|
? '客运-'
|
|
|
|
|
|
|
|
: crNamesAuto.includes(ele.name)
|
|
|
|
|
|
|
|
? '客运Task'
|
|
|
|
|
|
|
|
: crNames.includes(ele.name) || ele.name.includes('by_cr')
|
|
|
|
|
|
|
|
? ele.language + '-客运'
|
|
|
|
|
|
|
|
: scNames.includes(ele.name)
|
|
|
|
|
|
|
|
? ele.language + '-示例'
|
|
|
|
|
|
|
|
: ele.language,
|
|
|
|
}))
|
|
|
|
}))
|
|
|
|
|
|
|
|
|
|
|
|
const top2Name = topName.concat(canUseTemplates.filter(_t => _t.name.startsWith('order_updated')).map(_tem => _tem.name));
|
|
|
|
const top2Name = topName.concat(canUseTemplates.filter(_t => _t.name.startsWith('order_updated')).map(_tem => _tem.name));
|
|
|
|
|