feat: Dedicated tab for campaigns (#2741)

This commit is contained in:
Muhsin Keloth
2021-08-11 20:29:33 +05:30
committed by GitHub
parent 8daf1fe033
commit 4d668d8db3
22 changed files with 477 additions and 505 deletions

View File

@@ -4,107 +4,7 @@ export default [
title: 'Welcome',
description: null,
account_id: 1,
inbox: {
id: 37,
channel_id: 1,
name: 'Chatwoot',
channel_type: 'Channel::WebWidget',
greeting_enabled: true,
greeting_message: '',
working_hours_enabled: true,
out_of_office_message:
'We are unavailable at the moment. Leave a message we will respond once we are back.',
working_hours: [
{
day_of_week: 0,
closed_all_day: true,
open_hour: null,
open_minutes: null,
close_hour: null,
close_minutes: null,
},
{
day_of_week: 1,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 2,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 3,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 4,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 5,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 6,
closed_all_day: true,
open_hour: null,
open_minutes: null,
close_hour: null,
close_minutes: null,
},
],
timezone: 'Asia/Kolkata',
avatar_url: '',
page_id: null,
widget_color: '#1F93FF',
website_url: 'chatwoot.com',
welcome_title: 'Hi there ! 🙌🏼',
welcome_tagline:
'We make it simple to connect with us. Ask us anything, or share your feedback.',
enable_auto_assignment: true,
website_token: '',
forward_to_email: null,
phone_number: null,
selected_feature_flags: ['attachments', 'emoji_picker'],
reply_time: 'in_a_few_hours',
hmac_token: '',
pre_chat_form_enabled: true,
pre_chat_form_options: {
require_email: true,
pre_chat_message: 'Share your queries or comments here.',
},
},
sender: {
account_id: 1,
availability_status: 'offline',
confirmed: true,
email: 'sojan@chatwoot.com',
available_name: 'Sojan',
id: 10,
name: 'Sojan',
role: 'administrator',
thumbnail:
'http://0.0.0.0:3000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--bfa5e8a4563aef73980771fc9b8007d380e586e5/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lNTWpVd2VESTFNQVk2QmtWVSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--c13bd5229b2a2a692444606e22f76ad61c634661/73185.jpeg',
},
campaign_type: 'ongoing',
message: 'Hey, What brings you today',
enabled: true,
trigger_rules: {
@@ -119,110 +19,7 @@ export default [
title: 'Onboarding Campaign',
description: null,
account_id: 1,
inbox: {
id: 37,
channel_id: 1,
name: 'Chatwoot',
channel_type: 'Channel::WebWidget',
greeting_enabled: true,
greeting_message: '',
working_hours_enabled: true,
out_of_office_message:
'We are unavailable at the moment. Leave a message we will respond once we are back.',
working_hours: [
{
day_of_week: 0,
closed_all_day: true,
open_hour: null,
open_minutes: null,
close_hour: null,
close_minutes: null,
},
{
day_of_week: 1,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 2,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 3,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 4,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 5,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 6,
closed_all_day: true,
open_hour: null,
open_minutes: null,
close_hour: null,
close_minutes: null,
},
],
timezone: 'Asia/Kolkata',
avatar_url: '',
page_id: null,
widget_color: '#1F93FF',
website_url: 'chatwoot.com',
welcome_title: 'Hi there ! 🙌🏼',
welcome_tagline:
'We make it simple to connect with us. Ask us anything, or share your feedback.',
enable_auto_assignment: true,
web_widget_script: '',
website_token: '',
forward_to_email: null,
phone_number: null,
selected_feature_flags: ['attachments', 'emoji_picker'],
reply_time: 'in_a_few_hours',
hmac_token: '',
pre_chat_form_enabled: true,
pre_chat_form_options: {
require_email: true,
pre_chat_message: 'Share your queries or comments here.',
},
},
sender: {
account_id: 1,
availability_status: 'offline',
confirmed: true,
email: 'sojan@chatwoot.com',
available_name: 'Sojan',
id: 10,
name: 'Sojan',
role: 'administrator',
thumbnail:
'http://0.0.0.0:3000/rails/active_storage/representations/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBDZz09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--bfa5e8a4563aef73980771fc9b8007d380e586e5/eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaDdCam9MY21WemFYcGxTU0lNTWpVd2VESTFNQVk2QmtWVSIsImV4cCI6bnVsbCwicHVyIjoidmFyaWF0aW9uIn19--c13bd5229b2a2a692444606e22f76ad61c634661/73185.jpeg',
},
message: 'Begin your onboarding campaign with a welcome message',
enabled: true,
campaign_type: 'one_off',
trigger_rules: {
url: 'https://chatwoot.com',
time_on_page: '20',
@@ -235,107 +32,7 @@ export default [
title: 'Thanks',
description: null,
account_id: 1,
inbox: {
id: 37,
channel_id: 1,
name: 'Chatwoot',
channel_type: 'Channel::WebWidget',
greeting_enabled: true,
greeting_message: '',
working_hours_enabled: true,
out_of_office_message:
'We are unavailable at the moment. Leave a message we will respond once we are back.',
working_hours: [
{
day_of_week: 0,
closed_all_day: true,
open_hour: null,
open_minutes: null,
close_hour: null,
close_minutes: null,
},
{
day_of_week: 1,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 2,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 3,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 4,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 5,
closed_all_day: false,
open_hour: 11,
open_minutes: 0,
close_hour: 23,
close_minutes: 30,
},
{
day_of_week: 6,
closed_all_day: true,
open_hour: null,
open_minutes: null,
close_hour: null,
close_minutes: null,
},
],
timezone: 'Asia/Kolkata',
avatar_url: '',
page_id: null,
widget_color: '#1F93FF',
website_url: 'chatwoot.com',
welcome_title: 'Hi there ! 🙌🏼',
welcome_tagline:
'We make it simple to connect with us. Ask us anything, or share your feedback.',
enable_auto_assignment: true,
web_widget_script: '',
website_token: '',
forward_to_email: null,
phone_number: null,
selected_feature_flags: ['attachments', 'emoji_picker'],
reply_time: 'in_a_few_hours',
hmac_token: '',
pre_chat_form_enabled: true,
pre_chat_form_options: {
require_email: true,
pre_chat_message: 'Share your queries or comments here.',
},
},
sender: {
account_id: 1,
availability_status: 'offline',
confirmed: true,
email: 'nithin@chatwoot.com',
available_name: 'Nithin',
id: 13,
name: 'Nithin',
role: 'administrator',
thumbnail: '',
},
campaign_type: 'ongoing',
message: 'Thanks for coming to the show. How may I help you?',
enabled: false,
trigger_rules: {