From 80334698a79f0b948cd07de0c557cb9ac97ea61d Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Tue, 14 Jun 2022 12:54:10 +0530 Subject: [PATCH] fix(minor): Onboarding: add option to view list view in create action --- .../js/frappe/widgets/onboarding_widget.js | 23 ++++++++++++++----- 1 file changed, 17 insertions(+), 6 deletions(-) diff --git a/frappe/public/js/frappe/widgets/onboarding_widget.js b/frappe/public/js/frappe/widgets/onboarding_widget.js index 128d7e691a..3da102759f 100644 --- a/frappe/public/js/frappe/widgets/onboarding_widget.js +++ b/frappe/public/js/frappe/widgets/onboarding_widget.js @@ -99,12 +99,7 @@ export default class OnboardingWidget extends Widget { const toggle_content = () => { this.step_body.empty(); this.step_footer.empty(); - - this.step_body.html( - step.description ? - frappe.markdown(step.description) - : `

${step.title}

` - ); + set_description(); if (step.intro_video_url) { $(``) @@ -117,6 +112,22 @@ export default class OnboardingWidget extends Widget { } }; + const set_description = () => { + let content = step.description ? + frappe.markdown(step.description) + : `

${step.title}

` + + if (step.action === 'Create Entry') { + // add a secondary action to view list + content += `

+ + ${ __('Show {0} List', [step.reference_document])} +

` + } + + this.step_body.html(content); + } + const toggle_video = () => { this.step_body.empty(); this.step_footer.empty();