-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: QBD direct tracker update #1126
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -5,12 +5,13 @@ import { brandingContent, brandingKbArticles } from 'src/app/branding/branding-c | |||||||||||||
import { brandingConfig } from 'src/app/branding/c1-contents-config'; | ||||||||||||||
import { BrandingConfiguration } from 'src/app/core/models/branding/branding-configuration.model'; | ||||||||||||||
import { CheckBoxUpdate } from 'src/app/core/models/common/helper.model'; | ||||||||||||||
import { AppName, ConfigurationCta, QbdDirectOnboardingState, QBDPreRequisiteState } from 'src/app/core/models/enum/enum.model'; | ||||||||||||||
import { AppName, ConfigurationCta, Page, ProgressPhase, QbdDirectOnboardingState, QbdDirectUpdateEvent, QBDPreRequisiteState, TrackingApp } from 'src/app/core/models/enum/enum.model'; | ||||||||||||||
import { OnboardingStepper } from 'src/app/core/models/misc/onboarding-stepper.model'; | ||||||||||||||
import { QbdDirectWorkspace } from 'src/app/core/models/qbd-direct/db/qbd-direct-workspaces.model'; | ||||||||||||||
import { QBDPrerequisiteObject } from 'src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-connector.model'; | ||||||||||||||
import { QbdDirectOnboardingModel } from 'src/app/core/models/qbd-direct/qbd-direct-configuration/qbd-direct-onboarding.model'; | ||||||||||||||
import { WorkspaceService } from 'src/app/core/services/common/workspace.service'; | ||||||||||||||
import { TrackingService } from 'src/app/core/services/integration/tracking.service'; | ||||||||||||||
import { SharedModule } from 'src/app/shared/shared.module'; | ||||||||||||||
|
||||||||||||||
@Component({ | ||||||||||||||
|
@@ -61,9 +62,12 @@ export class QbdDirectOnboardingPreRequisiteComponent { | |||||||||||||
|
||||||||||||||
qbdPreRequisiteState = QBDPreRequisiteState; | ||||||||||||||
|
||||||||||||||
sessionStartTime: Date = new Date(); | ||||||||||||||
|
||||||||||||||
constructor( | ||||||||||||||
private router: Router, | ||||||||||||||
private workspaceService: WorkspaceService | ||||||||||||||
private workspaceService: WorkspaceService, | ||||||||||||||
private trackingService: TrackingService | ||||||||||||||
) { } | ||||||||||||||
|
||||||||||||||
updateConnectorStatus(status: CheckBoxUpdate): void { | ||||||||||||||
|
@@ -76,6 +80,22 @@ export class QbdDirectOnboardingPreRequisiteComponent { | |||||||||||||
continueToNextStep(): void{ | ||||||||||||||
this.saveInProgress = true; | ||||||||||||||
this.workspaceService.updateWorkspaceOnboardingState({onboarding_state: QbdDirectOnboardingState.CONNECTION}).subscribe((workspaceResponse: QbdDirectWorkspace) => { | ||||||||||||||
this.trackingService.trackTimeSpent(TrackingApp.QBD_DIRECT, Page.CONFIRM_PRE_REQUISITES_QBD_DIRECT, this.sessionStartTime); | ||||||||||||||
if (this.workspaceService.getOnboardingState() === QbdDirectOnboardingState.CONFIRM_PRE_REQUISITES) { | ||||||||||||||
this.trackingService.integrationsOnboardingCompletion(TrackingApp.QBD_DIRECT, QbdDirectOnboardingState.CONFIRM_PRE_REQUISITES, 1); | ||||||||||||||
} else { | ||||||||||||||
const oldWorkspaceResponse = workspaceResponse; | ||||||||||||||
oldWorkspaceResponse.onboarding_state = QbdDirectOnboardingState.CONFIRM_PRE_REQUISITES; | ||||||||||||||
this.trackingService.onUpdateEvent( | ||||||||||||||
Comment on lines
+87
to
+89
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Modify Assigning Apply this diff to fix the issue: - const oldWorkspaceResponse = workspaceResponse;
+ const oldWorkspaceResponse = { ...workspaceResponse }; 📝 Committable suggestion
Suggested change
|
||||||||||||||
TrackingApp.QBD_DIRECT, | ||||||||||||||
QbdDirectUpdateEvent.CONFIRM_PRE_REQUISITES_QBD_DIRECT, | ||||||||||||||
{ | ||||||||||||||
phase: ProgressPhase.ONBOARDING, | ||||||||||||||
oldState: oldWorkspaceResponse, | ||||||||||||||
newState: workspaceResponse | ||||||||||||||
} | ||||||||||||||
); | ||||||||||||||
} | ||||||||||||||
this.workspaceService.setOnboardingState(workspaceResponse.onboarding_state); | ||||||||||||||
this.saveInProgress = false; | ||||||||||||||
this.router.navigate([`/integrations/qbd_direct/onboarding/connector`]); | ||||||||||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's have all 3 sub steps in 2nd step as trackers