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
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 477 additions and 505 deletions

View file

@ -1,13 +1,10 @@
import { CAMPAIGN_TYPES } from '../constants/campaign';
import inboxMixin from './inboxMixin';
export default {
mixins: [inboxMixin],
computed: {
campaignType() {
if (this.isAWebWidgetInbox) {
return CAMPAIGN_TYPES.ONGOING;
}
return CAMPAIGN_TYPES.ONE_OFF;
const pageURL = window.location.href;
const type = pageURL.substr(pageURL.lastIndexOf('/') + 1);
return type;
},
isOngoingType() {
return this.campaignType === CAMPAIGN_TYPES.ONGOING;