Added color coding to timesheet calendars (#6269)
This commit is contained in:
parent
294664b24c
commit
6594c841a7
@ -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),
|
||||
|
@ -8,6 +8,11 @@ frappe.views.calendar["Timesheet"] = {
|
||||
"allDay": "allDay",
|
||||
"child_name": "name"
|
||||
},
|
||||
style_map: {
|
||||
"0": "info",
|
||||
"1": "standard",
|
||||
"2": "danger"
|
||||
},
|
||||
gantt: true,
|
||||
filters: [
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user