{"action":"created","comment":{"url":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/comments/81445380","pull_request_review_id":2427645,"id":81445380,"diff_hunk":"@@ -5,6 +5,52 @@ cur_frm.add_fetch('employee', 'company', 'company');\n cur_frm.add_fetch('employee', 'employee_name', 'employee_name');\n cur_frm.add_fetch('employee','attendance_approver','attendance_approver')\n \n+frappe.ui.form.on(\"Attendance\", \"refresh\", function(frm) {\n+\tif(!cur_frm.doc.__islocal && cur_frm.doc.attendance_approver) {\n+\t\tcur_frm.add_custom_button(__('Send for Approval'),\n+\t\tfunction() {\n+\t\t\tfrappe.call({\n+\t\t\t\tmethod: \"digitales.digitales.custom_methods.send_mail_to_approver\",\n+\t\t\t\targs: {\n+\t\t\t\t\t'doctype':\"Attendance\",\n+\t\t\t\t\t'doc_name': cur_frm.doc.name,\n+\t\t\t\t\t'att_date':cur_frm.doc.att_date,\n+\t\t\t\t\t'employee_name':cur_frm.doc.employee_name,\n+\t\t\t\t\t'attendance_approver':cur_frm.doc.attendance_approver,\n+\t\t\t\t\t'send_mail_to_approver':cur_frm.doc.send_mail_to_approver\n+\t\t\t\t},\n+\t\t\t\tcallback: function(r) {\n+\t\t\t\t\tif(r.message == \"Success\"){\n+\t\t\t\t\t\tcur_frm.set_value(\"send_mail_to_approver\",1)\n+\t\t\t\t\t\tcur_frm.save();\n+\t\t\t\t\t}\n+\t\t\t\t}\n+\t\t\t})\n+\t\t}, \"icon-exclamation\", \"btn-default send_mail_to_approver\");\n+\t}\n+\tif((!cur_frm.doc.__islocal && cur_frm.doc.attendance_approver == user) || cur_frm.doc.send_mail_to_approver == 1){\n+\t\t$('button.send_mail_to_approver').hide();\n+\t}\n+\tif(cur_frm.doc.employee){\n+\t\tfrappe.call({\n+\t\t\tmethod: \"digitales.digitales.custom_methods.get_attendance_approver\",\n+\t\t\targs:{\n+\t\t\t\t\"employee\":cur_frm.doc.employee\n+\t\t\t\t},\n+\t\t\t\tcallback: function(res){\n+\t\t\t\tif(res && res.message){\n+\t\t\t\t\tcur_frm.set_value(\"attendance_approver\",res.message[0])\n+\t\t\t\t\tcur_frm.set_value(\"employee_name\",res.message[1])\n+\t\t\t\t}\n+\t\t\t}\n+\t\t});\n+\t}\n+});\n+\n+\n+\n+\n+","path":"erpnext/hr/doctype/attendance/attendance.js","position":49,"original_position":49,"commit_id":"c886e851d65876ab8bb694398cdb3cd81282d75d","original_commit_id":"c886e851d65876ab8bb694398cdb3cd81282d75d","user":{"login":"mbauskar","id":11224291,"avatar_url":"https://avatars.githubusercontent.com/u/11224291?v=3","gravatar_id":"","url":"https://api.github.com/users/mbauskar","html_url":"https://github.com/mbauskar","followers_url":"https://api.github.com/users/mbauskar/followers","following_url":"https://api.github.com/users/mbauskar/following{/other_user}","gists_url":"https://api.github.com/users/mbauskar/gists{/gist_id}","starred_url":"https://api.github.com/users/mbauskar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mbauskar/subscriptions","organizations_url":"https://api.github.com/users/mbauskar/orgs","repos_url":"https://api.github.com/users/mbauskar/repos","events_url":"https://api.github.com/users/mbauskar/events{/privacy}","received_events_url":"https://api.github.com/users/mbauskar/received_events","type":"User","site_admin":false},"body":"remove the white space","created_at":"2016-10-01T07:09:02Z","updated_at":"2016-10-01T07:09:03Z","html_url":"https://github.com/indictranstech/digitales_erpnext/pull/18#discussion_r81445380","pull_request_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/18","_links":{"self":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/comments/81445380"},"html":{"href":"https://github.com/indictranstech/digitales_erpnext/pull/18#discussion_r81445380"},"pull_request":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/18"}}},"pull_request":{"url":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/18","id":87593329,"html_url":"https://github.com/indictranstech/digitales_erpnext/pull/18","diff_url":"https://github.com/indictranstech/digitales_erpnext/pull/18.diff","patch_url":"https://github.com/indictranstech/digitales_erpnext/pull/18.patch","issue_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/issues/18","number":18,"state":"open","locked":false,"title":"[fix] added button on attendance","user":{"login":"patilsangram","id":14306547,"avatar_url":"https://avatars.githubusercontent.com/u/14306547?v=3","gravatar_id":"","url":"https://api.github.com/users/patilsangram","html_url":"https://github.com/patilsangram","followers_url":"https://api.github.com/users/patilsangram/followers","following_url":"https://api.github.com/users/patilsangram/following{/other_user}","gists_url":"https://api.github.com/users/patilsangram/gists{/gist_id}","starred_url":"https://api.github.com/users/patilsangram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patilsangram/subscriptions","organizations_url":"https://api.github.com/users/patilsangram/orgs","repos_url":"https://api.github.com/users/patilsangram/repos","events_url":"https://api.github.com/users/patilsangram/events{/privacy}","received_events_url":"https://api.github.com/users/patilsangram/received_events","type":"User","site_admin":false},"body":"","created_at":"2016-10-01T06:17:53Z","updated_at":"2016-10-01T07:09:03Z","closed_at":null,"merged_at":null,"merge_commit_sha":"d6a213d2a9dba56c7548bed5ce0a607b62f9abc8","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/18/commits","review_comments_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/18/comments","review_comment_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/comments{/number}","comments_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/issues/18/comments","statuses_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/statuses/c886e851d65876ab8bb694398cdb3cd81282d75d","head":{"label":"patilsangram:develop","ref":"develop","sha":"c886e851d65876ab8bb694398cdb3cd81282d75d","user":{"login":"patilsangram","id":14306547,"avatar_url":"https://avatars.githubusercontent.com/u/14306547?v=3","gravatar_id":"","url":"https://api.github.com/users/patilsangram","html_url":"https://github.com/patilsangram","followers_url":"https://api.github.com/users/patilsangram/followers","following_url":"https://api.github.com/users/patilsangram/following{/other_user}","gists_url":"https://api.github.com/users/patilsangram/gists{/gist_id}","starred_url":"https://api.github.com/users/patilsangram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patilsangram/subscriptions","organizations_url":"https://api.github.com/users/patilsangram/orgs","repos_url":"https://api.github.com/users/patilsangram/repos","events_url":"https://api.github.com/users/patilsangram/events{/privacy}","received_events_url":"https://api.github.com/users/patilsangram/received_events","type":"User","site_admin":false},"repo":{"id":59211866,"name":"digitales_erpnext","full_name":"patilsangram/digitales_erpnext","owner":{"login":"patilsangram","id":14306547,"avatar_url":"https://avatars.githubusercontent.com/u/14306547?v=3","gravatar_id":"","url":"https://api.github.com/users/patilsangram","html_url":"https://github.com/patilsangram","followers_url":"https://api.github.com/users/patilsangram/followers","following_url":"https://api.github.com/users/patilsangram/following{/other_user}","gists_url":"https://api.github.com/users/patilsangram/gists{/gist_id}","starred_url":"https://api.github.com/users/patilsangram/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/patilsangram/subscriptions","organizations_url":"https://api.github.com/users/patilsangram/orgs","repos_url":"https://api.github.com/users/patilsangram/repos","events_url":"https://api.github.com/users/patilsangram/events{/privacy}","received_events_url":"https://api.github.com/users/patilsangram/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/patilsangram/digitales_erpnext","description":"","fork":true,"url":"https://api.github.com/repos/patilsangram/digitales_erpnext","forks_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/forks","keys_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/teams","hooks_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/hooks","issue_events_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/issues/events{/number}","events_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/events","assignees_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/assignees{/user}","branches_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/branches{/branch}","tags_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/tags","blobs_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/git/refs{/sha}","trees_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/statuses/{sha}","languages_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/languages","stargazers_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/stargazers","contributors_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/contributors","subscribers_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/subscribers","subscription_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/subscription","commits_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/commits{/sha}","git_commits_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/git/commits{/sha}","comments_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/comments{/number}","issue_comment_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/issues/comments{/number}","contents_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/contents/{+path}","compare_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/merges","archive_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/downloads","issues_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/issues{/number}","pulls_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/pulls{/number}","milestones_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/milestones{/number}","notifications_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/labels{/name}","releases_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/releases{/id}","deployments_url":"https://api.github.com/repos/patilsangram/digitales_erpnext/deployments","created_at":"2016-05-19T14:03:27Z","updated_at":"2016-05-19T14:03:35Z","pushed_at":"2016-10-01T06:15:23Z","git_url":"git://github.com/patilsangram/digitales_erpnext.git","ssh_url":"git@github.com:patilsangram/digitales_erpnext.git","clone_url":"https://github.com/patilsangram/digitales_erpnext.git","svn_url":"https://github.com/patilsangram/digitales_erpnext","homepage":null,"size":40574,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"develop"}},"base":{"label":"indictranstech:develop","ref":"develop","sha":"da5c8e2fbee9c733344e89673a2ba1ded6db2916","user":{"login":"indictranstech","id":11436302,"avatar_url":"https://avatars.githubusercontent.com/u/11436302?v=3","gravatar_id":"","url":"https://api.github.com/users/indictranstech","html_url":"https://github.com/indictranstech","followers_url":"https://api.github.com/users/indictranstech/followers","following_url":"https://api.github.com/users/indictranstech/following{/other_user}","gists_url":"https://api.github.com/users/indictranstech/gists{/gist_id}","starred_url":"https://api.github.com/users/indictranstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indictranstech/subscriptions","organizations_url":"https://api.github.com/users/indictranstech/orgs","repos_url":"https://api.github.com/users/indictranstech/repos","events_url":"https://api.github.com/users/indictranstech/events{/privacy}","received_events_url":"https://api.github.com/users/indictranstech/received_events","type":"Organization","site_admin":false},"repo":{"id":52777565,"name":"digitales_erpnext","full_name":"indictranstech/digitales_erpnext","owner":{"login":"indictranstech","id":11436302,"avatar_url":"https://avatars.githubusercontent.com/u/11436302?v=3","gravatar_id":"","url":"https://api.github.com/users/indictranstech","html_url":"https://github.com/indictranstech","followers_url":"https://api.github.com/users/indictranstech/followers","following_url":"https://api.github.com/users/indictranstech/following{/other_user}","gists_url":"https://api.github.com/users/indictranstech/gists{/gist_id}","starred_url":"https://api.github.com/users/indictranstech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/indictranstech/subscriptions","organizations_url":"https://api.github.com/users/indictranstech/orgs","repos_url":"https://api.github.com/users/indictranstech/repos","events_url":"https://api.github.com/users/indictranstech/events{/privacy}","received_events_url":"https://api.github.com/users/indictranstech/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/indictranstech/digitales_erpnext","description":"","fork":false,"url":"https://api.github.com/repos/indictranstech/digitales_erpnext","forks_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/forks","keys_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/keys{/key_id}","collaborators_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/teams","hooks_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/hooks","issue_events_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/issues/events{/number}","events_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/events","assignees_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/assignees{/user}","branches_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/branches{/branch}","tags_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/tags","blobs_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/git/refs{/sha}","trees_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/git/trees{/sha}","statuses_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/statuses/{sha}","languages_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/languages","stargazers_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/stargazers","contributors_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/contributors","subscribers_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/subscribers","subscription_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/subscription","commits_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/commits{/sha}","git_commits_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/git/commits{/sha}","comments_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/comments{/number}","issue_comment_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/issues/comments{/number}","contents_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/contents/{+path}","compare_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/compare/{base}...{head}","merges_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/merges","archive_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/downloads","issues_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/issues{/number}","pulls_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls{/number}","milestones_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/milestones{/number}","notifications_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/labels{/name}","releases_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/releases{/id}","deployments_url":"https://api.github.com/repos/indictranstech/digitales_erpnext/deployments","created_at":"2016-02-29T08:57:39Z","updated_at":"2016-02-29T09:03:48Z","pushed_at":"2016-10-01T06:17:53Z","git_url":"git://github.com/indictranstech/digitales_erpnext.git","ssh_url":"git@github.com:indictranstech/digitales_erpnext.git","clone_url":"https://github.com/indictranstech/digitales_erpnext.git","svn_url":"https://github.com/indictranstech/digitales_erpnext","homepage":null,"size":40595,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"open_issues_count":1,"forks":4,"open_issues":1,"watchers":0,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/18"},"html":{"href":"https://github.com/indictranstech/digitales_erpnext/pull/18"},"issue":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/issues/18"},"comments":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/issues/18/comments"},"review_comments":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/18/comments"},"review_comment":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/pulls/18/commits"},"statuses":{"href":"https://api.github.com/repos/indictranstech/digitales_erpnext/statuses/c886e851d65876ab8bb694398cdb3cd81282d75d"}}}}
{"actor":{"display_login":"mbauskar"}}