From 3156d0884ccdbe261759c266885725fd1a10a115 Mon Sep 17 00:00:00 2001 From: Thomas Nabord Date: Fri, 24 Mar 2023 17:35:26 +0100 Subject: [PATCH] Open remarketing tag popin when after closing the config success popin --- .../components/campaigns/campaign-card.vue | 18 ++------------- .../components/commons/popin-configured.vue | 17 +++----------- _dev/apps/ui/src/views/onboarding-page.vue | 23 ++++++++++++------- 3 files changed, 20 insertions(+), 38 deletions(-) diff --git a/_dev/apps/ui/src/components/campaigns/campaign-card.vue b/_dev/apps/ui/src/components/campaigns/campaign-card.vue index 4aa0a08451..61882c6494 100644 --- a/_dev/apps/ui/src/components/campaigns/campaign-card.vue +++ b/_dev/apps/ui/src/components/campaigns/campaign-card.vue @@ -76,28 +76,14 @@ export default { default: true, }, }, - computed: { - accountHasAtLeastOneCampaign() { - return !!this.$store.getters['campaigns/GET_ALL_CAMPAIGNS']?.length; - }, - remarketingTagIsSet() { - return this.$store.getters['campaigns/GET_REMARKETING_TRACKING_TAG_IS_SET']; - }, - }, methods: { openPopinActivateTracking() { this.$segment.track('[GGL] Create SSC Config tab', { module: 'psxmarketingwithgoogle', params: SegmentGenericParams, }); - // Prevent popin for opening if tracking is a campaign exists - if (this.accountHasAtLeastOneCampaign && this.remarketingTagIsSet) { - this.$router.push({ - name: 'campaign-creation', - }); - } else { - this.$emit('openPopin'); - } + + this.$emit('openPopin'); }, }, }; diff --git a/_dev/apps/ui/src/components/commons/popin-configured.vue b/_dev/apps/ui/src/components/commons/popin-configured.vue index 621546c47f..2ed3477023 100644 --- a/_dev/apps/ui/src/components/commons/popin-configured.vue +++ b/_dev/apps/ui/src/components/commons/popin-configured.vue @@ -72,11 +72,6 @@ export default { ], }; }, - computed: { - accountHasAtLeastOneCampaign() { - return !!this.$store.getters['campaigns/GET_ALL_CAMPAIGNS']?.length; - }, - }, methods: { cancel() { this.$refs.modal.hide(); @@ -86,15 +81,9 @@ export default { module: 'psxmarketingwithgoogle', params: SegmentGenericParams, }); - // Prevent popin for opening if tracking is a campaign exists - if (this.accountHasAtLeastOneCampaign) { - this.$router.push({ - name: 'campaign-creation', - }); - } else { - this.$refs.modal.hide(); - this.$emit('openPopinRemarketingTag'); - } + + this.$refs.modal.hide(); + this.$emit('openPopinRemarketingTag'); }, }, }; diff --git a/_dev/apps/ui/src/views/onboarding-page.vue b/_dev/apps/ui/src/views/onboarding-page.vue index 583db2b8be..542f116390 100644 --- a/_dev/apps/ui/src/views/onboarding-page.vue +++ b/_dev/apps/ui/src/views/onboarding-page.vue @@ -98,11 +98,11 @@ v-if="stepsAreCompleted.step2" :is-enabled="stepsAreCompleted.step3" :loading="SSCIsLoading" - @openPopin="onOpenPopinActivateTracking" + @openPopin="proceedToCampaignCreation" @remarketingTagHasBeenActivated="checkAndOpenPopinConfigrationDone" /> @@ -132,7 +132,7 @@ />