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",
"COLLABORATORS": "Collaborators",
"CONFIGURATION": "Configuration",
"CAMPAIGN": "Campaigns",
"PRE_CHAT_FORM": "Pre Chat Form",
"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 _teamsSettings } from './teamsSettings.json';
import { default as _campaign } from './campaign.json';
export default {
..._agentMgmt,
..._cannedMgmt,
@ -32,4 +34,5 @@ export default {
..._integrations,
..._generalSettings,
..._teamsSettings,
..._campaign,
};

View file

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