chore: Add campaign empty page (#2173)

* Enhancement: Create route for contact details page

* add campaign page, add button, campaign description

* add locale texts

* update locale texts

* update grid

Co-authored-by: Nithin David <webofnithin@gmail.com>
This commit is contained in:
Muhsin Keloth 2021-04-28 18:57:47 +05:30 committed by GitHub
parent 6ea1e0d047
commit aa47bad4c1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 2 deletions

View file

@ -0,0 +1,9 @@
{
"CAMPAIGN": {
"HEADER": "Campaigns",
"HEADER_BTN_TXT": "Create Campaign",
"LIST": {
"404": "There are no campaigns attached to this inbox"
}
}
}

View file

@ -227,6 +227,7 @@
"SETTINGS": "Settings", "SETTINGS": "Settings",
"COLLABORATORS": "Collaborators", "COLLABORATORS": "Collaborators",
"CONFIGURATION": "Configuration", "CONFIGURATION": "Configuration",
"CAMPAIGN": "Campaigns",
"PRE_CHAT_FORM": "Pre Chat Form", "PRE_CHAT_FORM": "Pre Chat Form",
"BUSINESS_HOURS": "Business Hours" "BUSINESS_HOURS": "Business Hours"
}, },

View file

@ -15,6 +15,8 @@ import { default as _integrations } from './integrations.json';
import { default as _generalSettings } from './generalSettings.json'; import { default as _generalSettings } from './generalSettings.json';
import { default as _teamsSettings } from './teamsSettings.json'; import { default as _teamsSettings } from './teamsSettings.json';
import { default as _campaign } from './campaign.json';
export default { export default {
..._agentMgmt, ..._agentMgmt,
..._cannedMgmt, ..._cannedMgmt,
@ -32,4 +34,5 @@ export default {
..._integrations, ..._integrations,
..._generalSettings, ..._generalSettings,
..._teamsSettings, ..._teamsSettings,
..._campaign,
}; };

View file

@ -257,6 +257,9 @@
<div v-if="selectedTabKey === 'businesshours'"> <div v-if="selectedTabKey === 'businesshours'">
<weekly-availability :inbox="inbox" /> <weekly-availability :inbox="inbox" />
</div> </div>
<div v-if="selectedTabKey === 'campaign'">
<campaign />
</div>
</div> </div>
</template> </template>
@ -270,6 +273,7 @@ import inboxMixin from 'shared/mixins/inboxMixin';
import FacebookReauthorize from './facebook/Reauthorize'; import FacebookReauthorize from './facebook/Reauthorize';
import PreChatFormSettings from './PreChatForm/Settings'; import PreChatFormSettings from './PreChatForm/Settings';
import WeeklyAvailability from './components/WeeklyAvailability'; import WeeklyAvailability from './components/WeeklyAvailability';
import Campaign from './components/Campaign';
export default { export default {
components: { components: {
@ -277,6 +281,7 @@ export default {
FacebookReauthorize, FacebookReauthorize,
PreChatFormSettings, PreChatFormSettings,
WeeklyAvailability, WeeklyAvailability,
Campaign,
}, },
mixins: [alertMixin, configMixin, inboxMixin], mixins: [alertMixin, configMixin, inboxMixin],
data() { data() {
@ -330,6 +335,10 @@ export default {
if (this.isAWebWidgetInbox) { if (this.isAWebWidgetInbox) {
return [ return [
...visibleToAllChannelTabs, ...visibleToAllChannelTabs,
{
key: 'campaign',
name: this.$t('INBOX_MGMT.TABS.CAMPAIGN'),
},
{ {
key: 'preChatForm', key: 'preChatForm',
name: this.$t('INBOX_MGMT.TABS.PRE_CHAT_FORM'), name: this.$t('INBOX_MGMT.TABS.PRE_CHAT_FORM'),
@ -392,7 +401,7 @@ export default {
}, },
toggleInput(selected, current) { toggleInput(selected, current) {
if (selected.includes(current)) { if (selected.includes(current)) {
const newSelectedFlags = selected.filter(flag => flag !== current); const newSelectedFlags = selected.filter((flag) => flag !== current);
return newSelectedFlags; return newSelectedFlags;
} }
return [...selected, current]; return [...selected, current];
@ -433,7 +442,7 @@ export default {
} }
}, },
async updateAgents() { async updateAgents() {
const agentList = this.selectedAgents.map(el => el.id); const agentList = this.selectedAgents.map((el) => el.id);
this.isAgentListUpdating = true; this.isAgentListUpdating = true;
try { try {
await this.$store.dispatch('inboxMembers/create', { await this.$store.dispatch('inboxMembers/create', {

View file

@ -0,0 +1,37 @@
<template>
<div class="column content-box">
<div class="row">
<a class="button icon success nice button--fixed-right-top">
<i class="icon ion-android-add-circle"></i>
{{ $t('CAMPAIGN.HEADER_BTN_TXT') }}
</a>
</div>
<div class="row">
<div class="small-8 columns">
<p class="no-items-error-message">
{{ $t('CAMPAIGN.LIST.404') }}
<a>
{{ $t('CAMPAIGN.HEADER_BTN_TXT') }}
</a>
</p>
</div>
<div class="small-4 columns">
<span>
<p>
<b> {{ $t('CAMPAIGN.HEADER') }}</b>
</p>
<p>
Proactive messages allows customer send outbound messages to their
contacts which would trigger more conversations. Campaigns are tied
to inbox. Click on
<b>Add Campaign</b>
to create a new campaign. You can also edit or delete an existing
campaigns Response by clicking on the Edit or Delete button.
</p>
</span>
</div>
</div>
</div>
</template>