fix(Dashboards): Fix dashboard date range
This commit is contained in:
parent
0b72155c35
commit
160ecf1003
2 changed files with 8 additions and 5 deletions
|
|
@ -175,19 +175,19 @@
|
|||
"label": "Number of Groups"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.timespan === 'Choose Time Span'",
|
||||
"depends_on": "eval:doc.timespan === 'Select Date Range'",
|
||||
"fieldname": "from_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "From Date"
|
||||
},
|
||||
{
|
||||
"depends_on": "eval:doc.timespan === 'Choose Time Span'",
|
||||
"depends_on": "eval:doc.timespan === 'Select Date Range'",
|
||||
"fieldname": "to_date",
|
||||
"fieldtype": "Date",
|
||||
"label": "To Date"
|
||||
}
|
||||
],
|
||||
"modified": "2019-10-29 02:26:14.838057",
|
||||
"modified": "2019-11-04 12:32:14.525409",
|
||||
"modified_by": "Administrator",
|
||||
"module": "Desk",
|
||||
"name": "Dashboard Chart",
|
||||
|
|
|
|||
|
|
@ -19,8 +19,11 @@ def get(chart_name = None, chart = None, no_cache = None, from_date = None, to_d
|
|||
chart = frappe._dict(frappe.parse_json(chart))
|
||||
|
||||
timespan = chart.timespan
|
||||
from_date = chart.from_date
|
||||
to_date = chart.to_date
|
||||
|
||||
if chart.timespan == 'Select Date Range':
|
||||
from_date = chart.from_date
|
||||
to_date = chart.to_date
|
||||
|
||||
timegrain = chart.time_interval
|
||||
filters = frappe.parse_json(chart.filters_json)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue