fix: data was not properly maped

This commit is contained in:
Anurag Mishra 2020-09-03 16:59:21 +05:30
parent 4b59043266
commit e5b7cb0c15
3 changed files with 3 additions and 8 deletions

View File

@ -98,7 +98,8 @@ def add_attendance(events, start, end, conditions=None):
e = { e = {
"name": d.name, "name": d.name,
"doctype": "Attendance", "doctype": "Attendance",
"date": d.attendance_date, "start": d.attendance_date,
"end": d.attendance_date,
"title": cstr(d.status), "title": cstr(d.status),
"docstatus": d.docstatus "docstatus": d.docstatus
} }

View File

@ -1,12 +1,6 @@
// Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors // Copyright (c) 2018, Frappe Technologies Pvt. Ltd. and contributors
// For license information, please see license.txt // For license information, please see license.txt
frappe.views.calendar["Attendance"] = { frappe.views.calendar["Attendance"] = {
field_map: {
"start": "attendance_date",
"end": "attendance_date",
"id": "name",
"docstatus": 1
},
options: { options: {
header: { header: {
left: 'prev,next today', left: 'prev,next today',

View File

@ -103,7 +103,7 @@ def add_assignments(events, start, end, conditions=None):
"doctype": "Shift Assignment", "doctype": "Shift Assignment",
"start_date": d.start_date, "start_date": d.start_date,
"end_date": d.end_date if d.end_date else nowdate(), "end_date": d.end_date if d.end_date else nowdate(),
"title": cstr(d.employee_name) + \ "title": cstr(d.employee_name) + ":"+ \
cstr(d.shift_type), cstr(d.shift_type),
"docstatus": d.docstatus "docstatus": d.docstatus
} }