Added a tenant feature flag for the onboarding tour

This commit is contained in:
Dean 2023-02-01 12:14:10 +00:00
parent f6c7b05ea3
commit 014eaf8c83
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,7 @@ import { get } from "svelte/store"
export const TENANT_FEATURE_FLAGS = {
LICENSING: "LICENSING",
USER_GROUPS: "USER_GROUPS",
ONBOADING_TOUR: "ONBOADING_TOUR",
}
export const isEnabled = featureFlag => {

View File

@ -2,6 +2,7 @@
import { store, automationStore } from "builderStore"
import { roles, flags } from "stores/backend"
import { auth } from "stores/portal"
import { TENANT_FEATURE_FLAGS, isEnabled } from "helpers/featureFlags"
import {
ActionMenu,
MenuItem,
@ -68,7 +69,10 @@
}
const initTour = async () => {
if (!$auth.user?.onboardedAt) {
if (
!$auth.user?.onboardedAt &&
isEnabled(TENANT_FEATURE_FLAGS.ONBOADING_TOUR)
) {
// Determine the correct step
const activeNav = $layout.children.find(c => $isActive(c.path))
const onboardingTour = TOURS[TOUR_KEYS.TOUR_BUILDER_ONBOARDING]