magma-labs / solidus_simple_dash

Overview dashboard for use with Solidus
BSD 3-Clause "New" or "Revised" License
2 stars 10 forks source link

Error: pie_colors is not defined #3

Closed Konafets closed 5 years ago

Konafets commented 5 years ago

I get this error after installing:

Uncaught ReferenceError: pie_colors is not defined
    at HTMLDocument.<anonymous> (dashboard.self-0bc1eb29111ae6a206f0cde86d8b2390b012403bf6f18f1295e020f4ef179f1b.js?body=1:86)
    at fire (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1:3233)
    at Object.fireWith [as resolveWith] (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1:3363)
    at Function.ready (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1:3583)
    at HTMLDocument.completed (jquery.self-bd7ddd393353a8d2480a622e80342adf488fb6006d667e8b42e4c0073393abee.js?body=1:3618)

I found out that the header scripts are not loaded until @display_ability is true, which only becomes true when the shop has more than 10 orders.

1) Why is this? 2) Why is this magic number not configurable?

jtapia commented 5 years ago

Thanks for your feedback, now you'll be able to set the limit like this

SolidusSimpleDash::Config.limit = 3

on your spree.rb