Added a tenant feature flag for the onboarding tour
This commit is contained in:
parent
f6c7b05ea3
commit
014eaf8c83
|
@ -4,6 +4,7 @@ import { get } from "svelte/store"
|
||||||
export const TENANT_FEATURE_FLAGS = {
|
export const TENANT_FEATURE_FLAGS = {
|
||||||
LICENSING: "LICENSING",
|
LICENSING: "LICENSING",
|
||||||
USER_GROUPS: "USER_GROUPS",
|
USER_GROUPS: "USER_GROUPS",
|
||||||
|
ONBOADING_TOUR: "ONBOADING_TOUR",
|
||||||
}
|
}
|
||||||
|
|
||||||
export const isEnabled = featureFlag => {
|
export const isEnabled = featureFlag => {
|
||||||
|
|
|
@ -2,6 +2,7 @@
|
||||||
import { store, automationStore } from "builderStore"
|
import { store, automationStore } from "builderStore"
|
||||||
import { roles, flags } from "stores/backend"
|
import { roles, flags } from "stores/backend"
|
||||||
import { auth } from "stores/portal"
|
import { auth } from "stores/portal"
|
||||||
|
import { TENANT_FEATURE_FLAGS, isEnabled } from "helpers/featureFlags"
|
||||||
import {
|
import {
|
||||||
ActionMenu,
|
ActionMenu,
|
||||||
MenuItem,
|
MenuItem,
|
||||||
|
@ -68,7 +69,10 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
const initTour = async () => {
|
const initTour = async () => {
|
||||||
if (!$auth.user?.onboardedAt) {
|
if (
|
||||||
|
!$auth.user?.onboardedAt &&
|
||||||
|
isEnabled(TENANT_FEATURE_FLAGS.ONBOADING_TOUR)
|
||||||
|
) {
|
||||||
// Determine the correct step
|
// Determine the correct step
|
||||||
const activeNav = $layout.children.find(c => $isActive(c.path))
|
const activeNav = $layout.children.find(c => $isActive(c.path))
|
||||||
const onboardingTour = TOURS[TOUR_KEYS.TOUR_BUILDER_ONBOARDING]
|
const onboardingTour = TOURS[TOUR_KEYS.TOUR_BUILDER_ONBOARDING]
|
||||||
|
|
Loading…
Reference in New Issue