From a1705c10f0333f2ad6b17ef865e10fba5514235d Mon Sep 17 00:00:00 2001 From: Shariq Ansari Date: Wed, 12 Mar 2025 21:53:26 +0530 Subject: [PATCH] fix: sync status after skip all --- frontend/src/components/GettingStartedBanner.vue | 10 +++++++--- frontend/src/components/Layouts/AppSidebar.vue | 8 +++++++- frontend/src/components/Modals/HelpModal.vue | 6 +++--- frontend/src/composables/onboarding.js | 1 + 4 files changed, 18 insertions(+), 7 deletions(-) diff --git a/frontend/src/components/GettingStartedBanner.vue b/frontend/src/components/GettingStartedBanner.vue index b520d0a0..7660b73b 100644 --- a/frontend/src/components/GettingStartedBanner.vue +++ b/frontend/src/components/GettingStartedBanner.vue @@ -25,7 +25,12 @@
@@ -46,7 +51,6 @@ import { isOnboardingStepsCompleted, useOnboarding, } from '@/composables/onboarding' -import FeatherIcon from 'frappe-ui/src/components/FeatherIcon.vue' const props = defineProps({ isSidebarCollapsed: { @@ -55,7 +59,7 @@ const props = defineProps({ }, }) -const emit = defineEmits(['completeNow']) +const emit = defineEmits(['completeNow', 'showHelpCenter']) const { stepsCompleted, totalSteps } = useOnboarding() diff --git a/frontend/src/components/Layouts/AppSidebar.vue b/frontend/src/components/Layouts/AppSidebar.vue index 6235d733..119f16be 100644 --- a/frontend/src/components/Layouts/AppSidebar.vue +++ b/frontend/src/components/Layouts/AppSidebar.vue @@ -83,6 +83,7 @@ showHelpModal = true } " + @showHelpCenter="showHelpCenter = true" /> - +
@@ -260,4 +265,5 @@ function getIcon(routeName, icon) { } const showHelpModal = ref(false) +const showHelpCenter = ref(false) diff --git a/frontend/src/components/Modals/HelpModal.vue b/frontend/src/components/Modals/HelpModal.vue index 141e3e97..d2edefb7 100644 --- a/frontend/src/components/Modals/HelpModal.vue +++ b/frontend/src/components/Modals/HelpModal.vue @@ -49,7 +49,7 @@ import { import { onMounted, computed } from 'vue' const show = defineModel() -const showHelpCenter = ref(false) +const showHelpCenter = defineModel('showHelpCenter') const title = computed(() => { if (!isOnboardingStepsCompleted.value && !showHelpCenter.value) { @@ -65,6 +65,7 @@ const footerItems = computed(() => { icon: HelpIcon, label: __('Help centre'), onClick: () => { + useOnboarding().syncStatus() showHelpCenter.value = true }, condition: !isOnboardingStepsCompleted.value && !showHelpCenter.value, @@ -87,8 +88,7 @@ const footerItems = computed(() => { }) function resetOnboardingSteps() { - const { reset } = useOnboarding() - reset() + useOnboarding().reset() isOnboardingStepsCompleted.value = false showHelpCenter.value = false } diff --git a/frontend/src/composables/onboarding.js b/frontend/src/composables/onboarding.js index f78c6a44..22d12a08 100644 --- a/frontend/src/composables/onboarding.js +++ b/frontend/src/composables/onboarding.js @@ -293,5 +293,6 @@ export function useOnboarding() { skip, skipAll, reset, + syncStatus, } }