vinsol / solidus_admin_insights

Dashboard for querying and viewing you solidus store's metrics
BSD 3-Clause "New" or "Revised" License
3 stars 4 forks source link

Make reporting interval flexible #4

Closed nimish-mehta closed 7 years ago

nimish-mehta commented 7 years ago

Rewrite the reports to use Arel and ActiveRecord instead of Sequel. This also removes reliance on MySQL specific extensions and uses ANSI SQL Functions where possible. Making the code database agnostic. Fixes #3

Move some presentation related logic(Month Name, etc) and inconsistent db behavior to ruby For a more consistent experience. e.g. Round behaves differently on Pg and MySQL.

Adds a scale factor To Reports

Reporting Period Report Scale
0 to 1 Days Hourly
1 to 60 Days Daily
61 to 600 Days Monthly
More than that Yearly

Todo