Debian Codegraph @

addons/crm_iap_mine/static/src/js/tours/crm_iap_lead.js

raw
1 import { registry } from "@web/core/registry";
2 import { _t } from "@web/core/l10n/translation";
3 import "@crm/js/tours/crm";
4 import { patch } from "@web/core/utils/patch";
5
6 import { markup } from "@odoo/owl";
7
8 patch(registry.category("web_tour.tours").get("crm_tour"), {
9 steps() {
10 const originalSteps = super.steps();
11 const DragOppToWonStepIndex = originalSteps.findIndex(
12 (step) => step.id === "drag_opportunity_to_won_step"
13 );
14 originalSteps.splice(
15 DragOppToWonStepIndex + 1,
16 0,
17 {
18 /**
19 * Add some steps between "Drag your opportunity to <b>Won</b> when you get
20 * the deal. Congrats!" and "Let’s have a look at an Opportunity." to
21 * include the steps related to the lead generation (crm_iap_mine).
22 * This eases the on boarding for the Lead Generation process.
23 *
24 */
25 trigger: ".o_button_generate_leads",
26 content: markup(_t("Looking for more opportunities?<br>Try the <b>Lead Generation</b> tool.")),
27 tooltipPosition: "bottom",
28 run: "click .o_button_generate_leads",
29 },
30 {
31 trigger: ".modal-body .o_industry",
32 content: _t("Which Industry do you want to target?"),
33 tooltipPosition: "right",
34 run: "click",
35 },
36 {
37 isActive: ["manual"],
38 trigger: ".modal-footer button[name=action_submit]",
39 content: _t("Now, just let the magic happen!"),
40 tooltipPosition: "bottom",
41 run: "click",
42 },
43 {
44 isActive: ["auto"],
45 trigger: ".modal-footer button[special=cancel]",
46 content: _t("Now, just let the magic happen!"),
47 tooltipPosition: "bottom",
48 run: "click",
49 }
50 );
51 return originalSteps;
52 },
53 });