diff --git a/crm/public/videos/change_deal_status.mov b/crm/public/videos/change_deal_status.mov new file mode 100644 index 00000000..72ed6b98 Binary files /dev/null and b/crm/public/videos/change_deal_status.mov differ diff --git a/crm/public/videos/convert_to_deal.mov b/crm/public/videos/convert_to_deal.mov new file mode 100644 index 00000000..13c6c26a Binary files /dev/null and b/crm/public/videos/convert_to_deal.mov differ diff --git a/frontend/components.d.ts b/frontend/components.d.ts index 8143cc0e..f09d0554 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -192,7 +192,6 @@ declare module 'vue' { SidePanelLayout: typeof import('./src/components/SidePanelLayout.vue')['default'] SidePanelLayoutEditor: typeof import('./src/components/SidePanelLayoutEditor.vue')['default'] SidePanelModal: typeof import('./src/components/Modals/SidePanelModal.vue')['default'] - SignupBanner: typeof import('./src/components/SignupBanner.vue')['default'] SLASection: typeof import('./src/components/SLASection.vue')['default'] SmileIcon: typeof import('./src/components/Icons/SmileIcon.vue')['default'] SortBy: typeof import('./src/components/SortBy.vue')['default'] diff --git a/frontend/src/components/Layouts/AppSidebar.vue b/frontend/src/components/Layouts/AppSidebar.vue index 325ecb80..58c54b52 100644 --- a/frontend/src/components/Layouts/AppSidebar.vue +++ b/frontend/src/components/Layouts/AppSidebar.vue @@ -132,6 +132,10 @@ :afterResetAll="() => capture('onboarding_steps_reset')" docsLink="https://docs.frappe.io/crm" /> + @@ -174,6 +178,7 @@ import { useOnboarding, showHelpModal, minimize, + IntermediateStepModal, } from 'frappe-ui/frappe' import { capture } from '@/telemetry' import router from '@/router' @@ -308,6 +313,9 @@ async function getFirstDeal() { return await call('crm.api.onboarding.get_first_deal') } +const showIntermediateModal = ref(false) +const currentStep = ref({}) + const steps = reactive([ { name: 'create_first_lead', @@ -338,13 +346,23 @@ const steps = reactive([ onClick: async () => { minimize.value = true - let lead = await getFirstLead() + currentStep.value = { + title: __('Convert lead to deal'), + buttonLabel: __('Convert'), + videoURL: '/assets/crm/videos/convert_to_deal.mov', + onClick: async () => { + showIntermediateModal.value = false + currentStep.value = {} - if (lead) { - router.push({ name: 'Lead', params: { leadId: lead } }) - } else { - router.push({ name: 'Leads' }) + let lead = await getFirstLead() + if (lead) { + router.push({ name: 'Lead', params: { leadId: lead } }) + } else { + router.push({ name: 'Leads' }) + } + }, } + showIntermediateModal.value = true }, }, { @@ -434,17 +452,28 @@ const steps = reactive([ 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' }) + currentStep.value = { + title: __('Change deal status'), + buttonLabel: __('Change'), + videoURL: '/assets/crm/videos/change_deal_status.mov', + onClick: async () => { + showIntermediateModal.value = false + currentStep.value = {} + + let deal = await getFirstDeal() + if (deal) { + router.push({ + name: 'Deal', + params: { dealId: deal }, + hash: '#activity', + }) + } else { + router.push({ name: 'Leads' }) + } + }, } + showIntermediateModal.value = true }, }, ])