diff --git a/frontend/src/composables/onboarding.js b/frontend/src/composables/onboarding.js index 9250f9ab..03ab2a25 100644 --- a/frontend/src/composables/onboarding.js +++ b/frontend/src/composables/onboarding.js @@ -149,6 +149,20 @@ const steps = reactive([ title: 'Change deal status', icon: markRaw(StepsIcon), completed: false, + onClick: async () => { + minimize.value = true + let deal = await getFirstDeal() + + if (deal) { + router.push({ + name: 'Deal', + params: { dealId: deal }, + hash: '#activity', + }) + } else { + router.push({ name: 'Leads' }) + } + }, }, ]) diff --git a/frontend/src/pages/Deal.vue b/frontend/src/pages/Deal.vue index cd83158a..f3a8d17b 100644 --- a/frontend/src/pages/Deal.vue +++ b/frontend/src/pages/Deal.vue @@ -330,6 +330,10 @@ import { getSettings } from '@/stores/settings' import { globalStore } from '@/stores/global' import { statusesStore } from '@/stores/statuses' import { whatsappEnabled, callEnabled } from '@/composables/settings' +import { + isOnboardingStepsCompleted, + useOnboarding, +} from '@/composables/onboarding' import { createResource, Dropdown, @@ -347,6 +351,8 @@ import { useActiveTabManager } from '@/composables/useActiveTabManager' const { brand } = getSettings() const { $dialog, $socket, makeCall } = globalStore() const { statusOptions, getDealStatus } = statusesStore() +const { updateOnboardingStep } = useOnboarding() + const route = useRoute() const router = useRouter() @@ -690,6 +696,10 @@ function triggerCall() { } function updateField(name, value, callback) { + if (name == 'status' && !isOnboardingStepsCompleted.value) { + updateOnboardingStep('change_deal_status') + } + updateDeal(name, value, () => { deal.data[name] = value callback?.()