refactor(onboarding): update step doctype

* remove mandatory (All steps are optional)
* add action label
* Allow form tour in create entry
This commit is contained in:
Shivam Mishra 2020-10-30 15:39:44 +05:30
parent 481979edba
commit faf126eea7
2 changed files with 15 additions and 13 deletions

View file

@ -8,7 +8,6 @@
"field_order": [
"title",
"column_break_2",
"is_mandatory",
"is_complete",
"is_skipped",
"description_section",
@ -16,9 +15,11 @@
"intro_video_url",
"section_break_5",
"action",
"action_label",
"column_break_7",
"reference_document",
"show_full_form",
"show_form_tour",
"is_single",
"reference_report",
"report_reference_doctype",
@ -33,13 +34,6 @@
"video_url"
],
"fields": [
{
"default": "0",
"fieldname": "is_mandatory",
"fieldtype": "Check",
"in_list_view": 1,
"label": "Is Mandatory"
},
{
"default": "0",
"fieldname": "is_complete",
@ -200,10 +194,22 @@
"fieldname": "intro_video_url",
"fieldtype": "Data",
"label": "Intro Video URL"
},
{
"fieldname": "action_label",
"fieldtype": "Data",
"label": "Action Label"
},
{
"default": "0",
"depends_on": "eval:doc.action==\"Create Entry\" && doc.show_full_form",
"fieldname": "show_form_tour",
"fieldtype": "Check",
"label": "Show Form Tour"
}
],
"links": [],
"modified": "2020-10-14 15:55:27.578883",
"modified": "2020-10-30 14:54:06.646513",
"modified_by": "Administrator",
"module": "Desk",
"name": "Onboarding Step",

View file

@ -10,7 +10,3 @@ class OnboardingStep(Document):
def before_export(self, doc):
doc.is_complete = 0
doc.is_skipped = 0
def validate(self):
if self.action == "Go to Page":
self.is_mandatory = 0