Merge pull request #15157 from pateljannat/onboarding-step-enhancement

fix: form tour field in onboarding step
This commit is contained in:
mergify[bot] 2021-12-03 08:52:41 +00:00 committed by GitHub
commit 75cebace8c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 25 additions and 3 deletions

View file

@ -2,6 +2,17 @@
// For license information, please see license.txt
frappe.ui.form.on("Onboarding Step", {
setup: function(frm) {
frm.set_query("form_tour", function() {
return {
filters: {
reference_doctype: frm.doc.reference_document
}
};
});
},
refresh: function(frm) {
frappe.boot.developer_mode &&
frm.set_intro(

View file

@ -20,6 +20,7 @@
"reference_document",
"show_full_form",
"show_form_tour",
"form_tour",
"is_single",
"reference_report",
"report_reference_doctype",
@ -206,13 +207,21 @@
"fieldname": "show_form_tour",
"fieldtype": "Check",
"label": "Show Form Tour"
},
{
"depends_on": "show_form_tour",
"fieldname": "form_tour",
"fieldtype": "Link",
"label": "Form Tour",
"options": "Form Tour"
}
],
"links": [],
"modified": "2020-10-30 14:54:06.646513",
"modified": "2021-12-02 10:56:04.448580",
"modified_by": "Administrator",
"module": "Desk",
"name": "Onboarding Step",
"naming_rule": "Set by user",
"owner": "Administrator",
"permissions": [
{

View file

@ -234,8 +234,9 @@ export default class OnboardingWidget extends Widget {
},
});
};
const tour_name = step.form_tour;
frm.tour
.init({ on_finish })
.init({ tour_name, on_finish })
.then(() => frm.tour.start());
};
@ -328,8 +329,9 @@ export default class OnboardingWidget extends Widget {
this.mark_complete(step);
};
};
const tour_name = step.form_tour;
frm.tour
.init({ on_finish })
.init({ tour_name, on_finish })
.then(() => frm.tour.start());
};