Hello;
Can someone advise me from where I can change or add indicators for dashboard (customer or supplier dashboard)?
I tried from erpnext/public/js/utils.js and I tried from frappe/frappe-bench/sites/assets/js/erpnext.min.js in the below script:
$.extend(erpnext.utils, {
set_party_dashboard_indicators: function set_party_dashboard_indicators(frm) {
if (frm.doc.__onload && frm.doc.onload.dashboard_info) {
var info = frm.doc.onload.dashboard_info;
frm.dashboard.add_indicator( (‘Annual Billing: {0}’, [format_currency(info.billing_this_year, info.currency)]), ‘blue’);
frm.dashboard.add_indicator( (‘Total Unpaid: {0}’, [format_currency(info.total_unpaid, info.currency)]), info.total_unpaid ? ‘orange’ : ‘green’);
}
},
But without any luck. I did service supervisor restart and I did bench migrate without any change.
Appreciate the kindly help.
Regards
Bilal
2 Likes
Hello;
Please, can someone help and advise me?
Regards
Bilal
Have you checked your browser console for any errors or clues?
Bravo @clarkej and big thanks for you.
It is worked and the change can be made from frappe/frappe-bench/sites/assets/js/erpnext.min.js.
One more help if possible:
I need to have the indicators in second line "another bar to be below the current one). How?
As shown in the image, I need to have indicators to be below the red rectangle. How?
Regards
Bilal
1 Like
Good you were successful -
Sorry I can’t advise you how to position, my guess is perhaps css knowhow…
1 Like
bghayad
January 23, 2018, 10:21pm
6
I tried to add indicators as you can see in the image but they are coming beside each other.
I would to know how to be able to add a new row for indicators (for example, each row to contain 2 or 3 indicators).
Appreciate if someone can help in how to do it.
You told me that css know how, so hope someone of css can help.
Again, thank you a lot for your kindly advise and help.
Regards
Bilal
Sara2
August 14, 2024, 2:24pm
7
How did you have the default section that comes with the indicator disappear. Mine look like the below:
@Sara2
Do you want to hide this Indicators??
Sara2
August 21, 2024, 8:48am
9
just the stats and collapsible part. Also I am having an issue of multiple rendering of frm.dashboard s. I put my code in a client script under the refresh event. if it displays multiple times sometimes…
Sara2
August 21, 2024, 9:52am
11
for instance frm.dashboard.add_progress and frm.dashboard.add_comment