fix: misc fixes in demo data
- Generate demo data field copy
- absolute imports
- remove whitelisting where it's not required
- telemetry
- banner copy
- move to background
- clear bootinfo after setup
diff --git a/erpnext/public/js/utils/demo.js b/erpnext/public/js/utils/demo.js
index 22d78d8..e810c37 100644
--- a/erpnext/public/js/utils/demo.js
+++ b/erpnext/public/js/utils/demo.js
@@ -2,15 +2,19 @@
if (frappe.boot.sysdefaults.demo_company) {
erpnext.setup_clear_button();
}
+
+ // for first load
+ frappe.realtime.on("demo_data_complete", () => {
+ erpnext.setup_clear_button();
+ })
});
erpnext.setup_clear_button = function() {
- let message_string = __('Demo data is setup, use this button to clear before starting actual transactions');
+ let message_string = __("Demo data is present on the system, erase data before starting real usage.");
let $floatingBar = $(`
<div class="flex justify-content-center" style="width: 100%;">
<div class="flex justify-content-center flex-col shadow rounded p-2"
style="
- width: 50%;
background-color: #e0f2fe;
position: fixed;
bottom: 20px;
@@ -34,7 +38,7 @@
margin-right: 10px
"
>
- Clear
+ Clear Demo Data
</button>
</div>
</div>
@@ -54,4 +58,4 @@
}
})
});
-}
\ No newline at end of file
+}