{"action":"created","comment":{"url":"https://api.github.com/repos/civicrm/civihr/pulls/comments/69724231","id":69724231,"diff_hunk":"@@ -155,6 +155,25 @@ define([\n                         return null;\n                     }\n \n+                    /**\n+                     * This is a little helper method to calculate the estimated leave amount for a\n+                     * leave type.\n+                     *\n+                     * If this leave type has \"add_public_holidays\" set, the estimated amount will be\n+                     * the leave amount + the given number of Public Holidays. Otherwise, the estimated\n+                     * amount is the same as the leave amount.\n+                     *\n+                     * @param {number} numberOfPublicHolidays\n+                     * @returns {number}\n+                     */\n+                    modelEntry.getEstimatedLeaveAmount = function(numberOfPublicHolidays) {\n+                      if(this.add_public_holidays == '1') {\n+                        return parseFloat(this.leave_amount) + parseFloat(numberOfPublicHolidays);","path":"hrjobcontract/js/src/job-contract/services/contract-leave.js","position":17,"original_position":17,"commit_id":"77fa7f22fe11179040480ab2df831e88af3619ae","original_commit_id":"77fa7f22fe11179040480ab2df831e88af3619ae","user":{"login":"AkA84","id":6400898,"avatar_url":"https://avatars.githubusercontent.com/u/6400898?v=3","gravatar_id":"","url":"https://api.github.com/users/AkA84","html_url":"https://github.com/AkA84","followers_url":"https://api.github.com/users/AkA84/followers","following_url":"https://api.github.com/users/AkA84/following{/other_user}","gists_url":"https://api.github.com/users/AkA84/gists{/gist_id}","starred_url":"https://api.github.com/users/AkA84/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AkA84/subscriptions","organizations_url":"https://api.github.com/users/AkA84/orgs","repos_url":"https://api.github.com/users/AkA84/repos","events_url":"https://api.github.com/users/AkA84/events{/privacy}","received_events_url":"https://api.github.com/users/AkA84/received_events","type":"User","site_admin":false},"body":"Out of curiosity, what values are you expecting to come from the api? (given the usage of `parseFloat')","created_at":"2016-07-06T12:56:07Z","updated_at":"2016-07-06T12:56:07Z","html_url":"https://github.com/civicrm/civihr/pull/1003#discussion_r69724231","pull_request_url":"https://api.github.com/repos/civicrm/civihr/pulls/1003","_links":{"self":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/comments/69724231"},"html":{"href":"https://github.com/civicrm/civihr/pull/1003#discussion_r69724231"},"pull_request":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/1003"}}},"pull_request":{"url":"https://api.github.com/repos/civicrm/civihr/pulls/1003","id":76343634,"html_url":"https://github.com/civicrm/civihr/pull/1003","diff_url":"https://github.com/civicrm/civihr/pull/1003.diff","patch_url":"https://github.com/civicrm/civihr/pull/1003.patch","issue_url":"https://api.github.com/repos/civicrm/civihr/issues/1003","number":1003,"state":"open","locked":false,"title":"PCHR-1062: Improvements to the Add/Edit Job Contract modal","user":{"login":"davialexandre","id":388373,"avatar_url":"https://avatars.githubusercontent.com/u/388373?v=3","gravatar_id":"","url":"https://api.github.com/users/davialexandre","html_url":"https://github.com/davialexandre","followers_url":"https://api.github.com/users/davialexandre/followers","following_url":"https://api.github.com/users/davialexandre/following{/other_user}","gists_url":"https://api.github.com/users/davialexandre/gists{/gist_id}","starred_url":"https://api.github.com/users/davialexandre/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davialexandre/subscriptions","organizations_url":"https://api.github.com/users/davialexandre/orgs","repos_url":"https://api.github.com/users/davialexandre/repos","events_url":"https://api.github.com/users/davialexandre/events{/privacy}","received_events_url":"https://api.github.com/users/davialexandre/received_events","type":"User","site_admin":false},"body":"This modal was updated to reflect the changes introduced by the new\r\nLeave and Absences extension:\r\n\r\n- The list of Leave types is now populated with data from the new\r\nAbsenceType entity\r\n- When adding a new Contract, the form shows the default entitlement\r\nand if the AbsenceType requires public holidays to be added to the\r\nentitlement\r\n- It's now possible to set in the modal if the entitlement for a specific\r\ncontract will include public holidays\r\n- Only one leave entitlement should have \"Add public holidays\" set\r\n\r\nThis is the screen before the changes:\r\n![captura de tela 2016-07-05 as 18 05 07](https://cloud.githubusercontent.com/assets/388373/16599948/305ec1d6-42db-11e6-9132-e97302803400.png)\r\n\r\nThis is the screen after the changes:\r\n![captura de tela 2016-07-05 as 18 06 35](https://cloud.githubusercontent.com/assets/388373/16599967/4550dcc8-42db-11e6-91fc-404f1d8ee9da.png)\r\n\r\nHere you can see how only one type can have \"Add Public Holidays\" set and how the \"Estimated Leave Entitlement\"  is updated to include/remove the number of public holidays accordingly:\r\n![job_contract](https://cloud.githubusercontent.com/assets/388373/16600020/94f86db8-42db-11e6-97ce-691679b47ed7.gif)\r\n","created_at":"2016-07-05T21:09:45Z","updated_at":"2016-07-06T12:56:07Z","closed_at":null,"merged_at":null,"merge_commit_sha":"add703e28fa4418f61c6a5b162582ea631fee0e9","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/civicrm/civihr/pulls/1003/commits","review_comments_url":"https://api.github.com/repos/civicrm/civihr/pulls/1003/comments","review_comment_url":"https://api.github.com/repos/civicrm/civihr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/civicrm/civihr/issues/1003/comments","statuses_url":"https://api.github.com/repos/civicrm/civihr/statuses/77fa7f22fe11179040480ab2df831e88af3619ae","head":{"label":"civicrm:PCHR-1062-Improve-leave-tab-screen","ref":"PCHR-1062-Improve-leave-tab-screen","sha":"77fa7f22fe11179040480ab2df831e88af3619ae","user":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":10086903,"name":"civihr","full_name":"civicrm/civihr","owner":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civicrm/civihr","description":"CiviHR","fork":false,"url":"https://api.github.com/repos/civicrm/civihr","forks_url":"https://api.github.com/repos/civicrm/civihr/forks","keys_url":"https://api.github.com/repos/civicrm/civihr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civihr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civihr/teams","hooks_url":"https://api.github.com/repos/civicrm/civihr/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civihr/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civihr/events","assignees_url":"https://api.github.com/repos/civicrm/civihr/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civihr/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civihr/tags","blobs_url":"https://api.github.com/repos/civicrm/civihr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civihr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civihr/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civihr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civihr/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civihr/languages","stargazers_url":"https://api.github.com/repos/civicrm/civihr/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civihr/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civihr/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civihr/subscription","commits_url":"https://api.github.com/repos/civicrm/civihr/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civihr/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civihr/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civihr/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civihr/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civihr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civihr/merges","archive_url":"https://api.github.com/repos/civicrm/civihr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civihr/downloads","issues_url":"https://api.github.com/repos/civicrm/civihr/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civihr/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civihr/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civihr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civihr/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civihr/releases{/id}","deployments_url":"https://api.github.com/repos/civicrm/civihr/deployments","created_at":"2013-05-15T20:06:06Z","updated_at":"2016-06-29T20:52:22Z","pushed_at":"2016-07-06T09:56:13Z","git_url":"git://github.com/civicrm/civihr.git","ssh_url":"git@github.com:civicrm/civihr.git","clone_url":"https://github.com/civicrm/civihr.git","svn_url":"https://github.com/civicrm/civihr","homepage":null,"size":22152,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":5,"forks":22,"open_issues":5,"watchers":4,"default_branch":"develop"}},"base":{"label":"civicrm:PCHR-863-migrate-to-4.7","ref":"PCHR-863-migrate-to-4.7","sha":"92da36ed39f146a79efb592c094060d4ba8165cb","user":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"repo":{"id":10086903,"name":"civihr","full_name":"civicrm/civihr","owner":{"login":"civicrm","id":136373,"avatar_url":"https://avatars.githubusercontent.com/u/136373?v=3","gravatar_id":"","url":"https://api.github.com/users/civicrm","html_url":"https://github.com/civicrm","followers_url":"https://api.github.com/users/civicrm/followers","following_url":"https://api.github.com/users/civicrm/following{/other_user}","gists_url":"https://api.github.com/users/civicrm/gists{/gist_id}","starred_url":"https://api.github.com/users/civicrm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/civicrm/subscriptions","organizations_url":"https://api.github.com/users/civicrm/orgs","repos_url":"https://api.github.com/users/civicrm/repos","events_url":"https://api.github.com/users/civicrm/events{/privacy}","received_events_url":"https://api.github.com/users/civicrm/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/civicrm/civihr","description":"CiviHR","fork":false,"url":"https://api.github.com/repos/civicrm/civihr","forks_url":"https://api.github.com/repos/civicrm/civihr/forks","keys_url":"https://api.github.com/repos/civicrm/civihr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/civicrm/civihr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/civicrm/civihr/teams","hooks_url":"https://api.github.com/repos/civicrm/civihr/hooks","issue_events_url":"https://api.github.com/repos/civicrm/civihr/issues/events{/number}","events_url":"https://api.github.com/repos/civicrm/civihr/events","assignees_url":"https://api.github.com/repos/civicrm/civihr/assignees{/user}","branches_url":"https://api.github.com/repos/civicrm/civihr/branches{/branch}","tags_url":"https://api.github.com/repos/civicrm/civihr/tags","blobs_url":"https://api.github.com/repos/civicrm/civihr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/civicrm/civihr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/civicrm/civihr/git/refs{/sha}","trees_url":"https://api.github.com/repos/civicrm/civihr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/civicrm/civihr/statuses/{sha}","languages_url":"https://api.github.com/repos/civicrm/civihr/languages","stargazers_url":"https://api.github.com/repos/civicrm/civihr/stargazers","contributors_url":"https://api.github.com/repos/civicrm/civihr/contributors","subscribers_url":"https://api.github.com/repos/civicrm/civihr/subscribers","subscription_url":"https://api.github.com/repos/civicrm/civihr/subscription","commits_url":"https://api.github.com/repos/civicrm/civihr/commits{/sha}","git_commits_url":"https://api.github.com/repos/civicrm/civihr/git/commits{/sha}","comments_url":"https://api.github.com/repos/civicrm/civihr/comments{/number}","issue_comment_url":"https://api.github.com/repos/civicrm/civihr/issues/comments{/number}","contents_url":"https://api.github.com/repos/civicrm/civihr/contents/{+path}","compare_url":"https://api.github.com/repos/civicrm/civihr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/civicrm/civihr/merges","archive_url":"https://api.github.com/repos/civicrm/civihr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/civicrm/civihr/downloads","issues_url":"https://api.github.com/repos/civicrm/civihr/issues{/number}","pulls_url":"https://api.github.com/repos/civicrm/civihr/pulls{/number}","milestones_url":"https://api.github.com/repos/civicrm/civihr/milestones{/number}","notifications_url":"https://api.github.com/repos/civicrm/civihr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/civicrm/civihr/labels{/name}","releases_url":"https://api.github.com/repos/civicrm/civihr/releases{/id}","deployments_url":"https://api.github.com/repos/civicrm/civihr/deployments","created_at":"2013-05-15T20:06:06Z","updated_at":"2016-06-29T20:52:22Z","pushed_at":"2016-07-06T09:56:13Z","git_url":"git://github.com/civicrm/civihr.git","ssh_url":"git@github.com:civicrm/civihr.git","clone_url":"https://github.com/civicrm/civihr.git","svn_url":"https://github.com/civicrm/civihr","homepage":null,"size":22152,"stargazers_count":4,"watchers_count":4,"language":"PHP","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":22,"mirror_url":null,"open_issues_count":5,"forks":22,"open_issues":5,"watchers":4,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/1003"},"html":{"href":"https://github.com/civicrm/civihr/pull/1003"},"issue":{"href":"https://api.github.com/repos/civicrm/civihr/issues/1003"},"comments":{"href":"https://api.github.com/repos/civicrm/civihr/issues/1003/comments"},"review_comments":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/1003/comments"},"review_comment":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/civicrm/civihr/pulls/1003/commits"},"statuses":{"href":"https://api.github.com/repos/civicrm/civihr/statuses/77fa7f22fe11179040480ab2df831e88af3619ae"}}}}
{"actor":{"display_login":"AkA84"}}