33 <app-menu ></app-menu >
44 <el-container :style =" elMainStyle" >
55 <el-main id =" main-page-wrapper" class =" relative" >
6- <div :class =" computedBannerWrapperClass" >
6+ <div
7+ :class =" {
8+ 'pt-16': showBanner
9+ }"
10+ >
711 <banner
8- v-if =" shouldShowSampleDataAlert "
12+ v-if =" showSampleDataAlert "
913 variant =" alert"
1014 >
1115 <div
2327 </div >
2428 </banner >
2529 <banner
26- v-if =" shouldShowIntegrationsErrorAlert "
30+ v-if =" showIntegrationsErrorAlert "
2731 variant =" alert"
2832 >
2933 <div
4145 </banner >
4246
4347 <banner
44- v-if =" shouldShowIntegrationsInProgressAlert "
48+ v-if =" showIntegrationsInProgressAlert "
4549 variant =" info"
4650 >
4751 <div
6771 </div >
6872 </banner >
6973 <banner
70- v-if =" shouldShowTenantCreatingAlert "
74+ v-if =" showTenantCreatingAlert "
7175 variant =" info"
7276 >
7377 <div
8488 completely loaded.
8589 </div >
8690 </banner >
87- <banner
88- v-if =" shouldShowPMFSurveyAlert"
89- variant =" info"
90- >
91+ <banner v-if =" showPMFSurveyAlert" variant =" info" >
9192 <div
9293 class =" flex items-center justify-center grow text-sm"
9394 >
@@ -129,7 +130,6 @@ import { mapActions, mapGetters } from 'vuex'
129130import Banner from ' @/shared/banner/banner.vue'
130131import identify from ' @/shared/monitoring/identify'
131132import ConfirmDialog from ' @/shared/dialog/confirm-dialog.js'
132- import moment from ' moment'
133133import config from ' @/config'
134134
135135export default {
@@ -160,7 +160,16 @@ export default {
160160 currentUser: ' auth/currentUser' ,
161161 currentTenant: ' auth/currentTenant' ,
162162 integrationsInProgress: ' integration/inProgress' ,
163- integrationsWithErrors: ' integration/withErrors'
163+ integrationsWithErrors: ' integration/withErrors' ,
164+ showSampleDataAlert: ' tenant/showSampleDataAlert' ,
165+ showIntegrationsErrorAlert:
166+ ' tenant/showIntegrationsErrorAlert' ,
167+ showIntegrationsInProgressAlert:
168+ ' tenant/showIntegrationsInProgressAlert' ,
169+ showTenantCreatingAlert:
170+ ' tenant/showTenantCreatingAlert' ,
171+ showPMFSurveyAlert: ' tenant/showPMFSurveyAlert' ,
172+ showBanner: ' tenant/showBanner'
164173 }),
165174 integrationsInProgressToString () {
166175 const arr = this .integrationsInProgress .map (
@@ -178,43 +187,6 @@ export default {
178187 )
179188 }
180189 },
181- shouldShowIntegrationsInProgressAlert () {
182- return this .integrationsInProgress .length > 0
183- },
184- shouldShowIntegrationsErrorAlert () {
185- return (
186- this .integrationsWithErrors .length > 0 &&
187- this .$route .name !== ' integration'
188- )
189- },
190- shouldShowSampleDataAlert () {
191- return this .currentTenant .hasSampleData
192- },
193- shouldShowPMFSurveyAlert () {
194- return (
195- config .typeformId &&
196- config .typeformTitle &&
197- ! this .hideTypeformBanner
198- )
199- },
200- shouldShowTenantCreatingAlert () {
201- return (
202- moment ().diff (
203- moment (this .currentTenant .createdAt ),
204- ' minutes'
205- ) <= 2
206- )
207- },
208- computedBannerWrapperClass () {
209- return {
210- ' pt-16' :
211- this .shouldShowSampleDataAlert ||
212- this .shouldShowIntegrationsErrorAlert ||
213- this .shouldShowIntegrationsInProgressAlert ||
214- this .shouldShowTenantCreatingAlert ||
215- this .shouldShowPMFSurveyAlert
216- }
217- },
218190 elMainStyle () {
219191 if (this .isMobile && ! this .collapsed ) {
220192 return {
@@ -280,30 +252,6 @@ export default {
280252 // as long as it's not one of the above reserved names.
281253 },
282254
283- account: {
284- id: this .currentTenant .id , // Required if using Pendo Feedback, default uses the value 'ACCOUNT-UNIQUE-ID'
285- name: this .currentTenant .name , // Optional
286- is_paying: this .currentTenant .plan !== ' Essential' // Recommended if using Pendo Feedback
287- // monthly_value:// Recommended if using Pendo Feedback
288- // planLevel: // Optional
289- // planPrice: // Optional
290- // creationDate: // Optional
291-
292- // You can add any additional account level key-values here,
293- // as long as it's not one of the above reserved names.
294- }
295- })
296- console .log ({
297- visitor: {
298- id: this .currentUser .id , // Required if user is logged in, default creates anonymous ID
299- email: this .currentUser .email , // Recommended if using Pendo Feedback, or NPS Email
300- full_name: this .currentUser .fullName // Recommended if using Pendo Feedback
301- // role: // Optional
302-
303- // You can add any additional visitor level key-values here,
304- // as long as it's not one of the above reserved names.
305- },
306-
307255 account: {
308256 id: this .currentTenant .id , // Required if using Pendo Feedback, default uses the value 'ACCOUNT-UNIQUE-ID'
309257 name: this .currentTenant .name , // Optional
0 commit comments