[minor] UX fixes for Daily Work Summary

This commit is contained in:
Rushabh Mehta
2016-11-21 12:10:20 +05:30
parent 5f453e7779
commit 557e7f787b
7 changed files with 30 additions and 11 deletions

View File

@@ -22,7 +22,6 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Company",
@@ -53,7 +52,6 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 1,
"in_standard_filter": 0,
"label": "Status",
@@ -83,7 +81,6 @@
"ignore_user_permissions": 0,
"ignore_xss_filter": 0,
"in_filter": 0,
"in_global_search": 0,
"in_list_view": 0,
"in_standard_filter": 0,
"label": "Email Sent To",
@@ -106,13 +103,13 @@
"hide_toolbar": 0,
"idx": 0,
"image_view": 0,
"in_create": 0,
"in_create": 1,
"in_dialog": 0,
"is_submittable": 0,
"issingle": 0,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-18 12:09:01.580414",
"modified": "2016-11-21 01:05:55.258867",
"modified_by": "Administrator",
"module": "HR",
"name": "Daily Work Summary",
@@ -144,7 +141,7 @@
"amend": 0,
"apply_user_permissions": 0,
"cancel": 0,
"create": 1,
"create": 0,
"delete": 1,
"email": 1,
"export": 1,
@@ -159,11 +156,11 @@
"set_user_permissions": 0,
"share": 1,
"submit": 0,
"write": 1
"write": 0
}
],
"quick_entry": 1,
"read_only": 0,
"read_only": 1,
"read_only_onload": 0,
"sort_field": "modified",
"sort_order": "DESC",

View File

@@ -9,6 +9,7 @@ from frappe import _
from email_reply_parser import EmailReplyParser
from erpnext.hr.doctype.employee.employee import is_holiday
from frappe.utils import formatdate
from markdown2 import markdown
class DailyWorkSummary(Document):
def send_mails(self, settings, emails):
@@ -46,7 +47,7 @@ class DailyWorkSummary(Document):
if d.sender in did_not_reply:
did_not_reply.remove(d.sender)
if d.text_content:
d.content = EmailReplyParser.parse_reply(d.text_content)
d.content = markdown(EmailReplyParser.parse_reply(d.text_content))
did_not_reply = [(frappe.db.get_value("Employee", {"user_id": email}, "employee_name") or email)
@@ -89,7 +90,7 @@ def get_employee_emails(company, only_working=True):
if e.user_id:
if only_working and is_holiday(e.name):
# don't add if holiday
pass
continue
out.append(e.user_id)
return out

View File

@@ -16,6 +16,7 @@
"bold": 0,
"collapsible": 0,
"columns": 0,
"description": "Emails will be sent to all Active Employees of the company at the given hour, if they do not have holiday. Summary of responses will be sent at midnight.",
"fieldname": "select_companies",
"fieldtype": "Section Break",
"hidden": 0,
@@ -165,7 +166,7 @@
"issingle": 1,
"istable": 0,
"max_attachments": 0,
"modified": "2016-11-08 05:48:53.068957",
"modified": "2016-11-21 00:55:20.726328",
"modified_by": "Administrator",
"module": "HR",
"name": "Daily Work Summary Settings",