Added color coding to timesheet calendars (#6269)

This commit is contained in:
bcornwellmott 2016-09-12 04:13:23 -07:00 committed by Rushabh Mehta
parent 294664b24c
commit 6594c841a7
2 changed files with 6 additions and 1 deletions

View File

@ -311,7 +311,7 @@ def get_events(start, end, filters=None):
filters = json.loads(filters)
conditions = get_conditions(filters)
return frappe.db.sql("""select `tabTimesheet Detail`.name as name, `tabTimesheet Detail`.parent as parent,
return frappe.db.sql("""select `tabTimesheet Detail`.name as name, `tabTimesheet Detail`.docstatus as status, `tabTimesheet Detail`.parent as parent,
from_time, hours, activity_type, project, to_time from `tabTimesheet Detail`,
`tabTimesheet` where `tabTimesheet Detail`.parent = `tabTimesheet`.name and `tabTimesheet`.docstatus < 2 and
(from_time between %(start)s and %(end)s) {conditions}""".format(conditions=conditions),

View File

@ -8,6 +8,11 @@ frappe.views.calendar["Timesheet"] = {
"allDay": "allDay",
"child_name": "name"
},
style_map: {
"0": "info",
"1": "standard",
"2": "danger"
},
gantt: true,
filters: [
{