fix: maximize if complete now is clicked

This commit is contained in:
Shariq Ansari 2025-03-12 17:08:42 +05:30
parent b91521df5a
commit 73bb4bd9f8
3 changed files with 8 additions and 7 deletions

View File

@ -77,7 +77,12 @@
<GettingStartedBanner <GettingStartedBanner
v-if="!isOnboardingStepsCompleted" v-if="!isOnboardingStepsCompleted"
:isSidebarCollapsed="isSidebarCollapsed" :isSidebarCollapsed="isSidebarCollapsed"
@completeNow="showHelpModal = true" @completeNow="
() => {
minimize = false
showHelpModal = true
}
"
/> />
<SidebarLink <SidebarLink
v-else v-else
@ -141,7 +146,7 @@ import {
unreadNotificationsCount, unreadNotificationsCount,
notificationsStore, notificationsStore,
} from '@/stores/notifications' } from '@/stores/notifications'
import { isOnboardingStepsCompleted } from '@/composables/onboarding' import { isOnboardingStepsCompleted, minimize } from '@/composables/onboarding'
import { FeatherIcon, TrialBanner } from 'frappe-ui' import { FeatherIcon, TrialBanner } from 'frappe-ui'
import { useStorage } from '@vueuse/core' import { useStorage } from '@vueuse/core'
import { ref, computed, h } from 'vue' import { ref, computed, h } from 'vue'

View File

@ -52,7 +52,7 @@
? 'text-ink-gray-5 line-through' ? 'text-ink-gray-5 line-through'
: 'text-ink-gray-8', : 'text-ink-gray-8',
]" ]"
@click="step.onClick" @click="() => !step.completed && step.onClick()"
> >
<component :is="step.icon" class="h-4" /> <component :is="step.icon" class="h-4" />
<div class="text-base">{{ step.title }}</div> <div class="text-base">{{ step.title }}</div>

View File

@ -29,9 +29,7 @@ const steps = reactive([
icon: markRaw(LeadsIcon), icon: markRaw(LeadsIcon),
completed: false, completed: false,
onClick: () => { onClick: () => {
if (steps[0].completed) return
minimize.value = true minimize.value = true
router.push({ name: 'Leads' }) router.push({ name: 'Leads' })
}, },
}, },
@ -41,9 +39,7 @@ const steps = reactive([
icon: markRaw(InviteIcon), icon: markRaw(InviteIcon),
completed: false, completed: false,
onClick: () => { onClick: () => {
if (steps[1].completed) return
minimize.value = true minimize.value = true
showSettings.value = true showSettings.value = true
activeSettingsPage.value = 'Invite Members' activeSettingsPage.value = 'Invite Members'
}, },