{"action":"created","comment":{"url":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/comments/49848273","id":49848273,"diff_hunk":"@@ -919,6 +919,67 @@\n                         }\n \n                         this.$DOM.sections.dataWrapper.fadeIn();\n+                        var $DOM = this.$DOM;\n+\n+                        $.ajax({","path":"civihr_employee_portal/js/reports.js","position":6,"original_position":6,"commit_id":"21aefdde2ad0cad3975b3879d146511e0f841fdd","original_commit_id":"21aefdde2ad0cad3975b3879d146511e0f841fdd","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":"I believe the jQuery version we are using is already using promises for ajax calls, so you can write something like this:\r\n\r\n```js\r\n$.ajax({\r\n    type: 'GET',\r\n    url: buildURL.call(this),\r\n})\r\n.then(function (data) {\r\n    this.$DOM.sections.dataWrapper.html(data).ready(/* ... */);\r\n})\r\n.then(function () {\r\n    return $ajax({\r\n        'type': 'GET',\r\n        'url': this.getJsonUrl() + ( typeof path !== 'undefined' ? path : '' )\r\n    });\r\n})\r\n.then(function (data) {\r\n    var mappedResults = {}\r\n\r\n    /* .... */\r\n});","created_at":"2016-01-15T12:26:12Z","updated_at":"2016-01-15T12:26:12Z","html_url":"https://github.com/compucorp/civihr-employee-portal/pull/94#discussion_r49848273","pull_request_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/94","_links":{"self":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/comments/49848273"},"html":{"href":"https://github.com/compucorp/civihr-employee-portal/pull/94#discussion_r49848273"},"pull_request":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/94"}}},"pull_request":{"url":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/94","id":56159620,"html_url":"https://github.com/compucorp/civihr-employee-portal/pull/94","diff_url":"https://github.com/compucorp/civihr-employee-portal/pull/94.diff","patch_url":"https://github.com/compucorp/civihr-employee-portal/pull/94.patch","issue_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues/94","number":94,"state":"open","locked":false,"title":"PCHR-788: Added summary table in reports","user":{"login":"Agares4","id":15697510,"avatar_url":"https://avatars.githubusercontent.com/u/15697510?v=3","gravatar_id":"","url":"https://api.github.com/users/Agares4","html_url":"https://github.com/Agares4","followers_url":"https://api.github.com/users/Agares4/followers","following_url":"https://api.github.com/users/Agares4/following{/other_user}","gists_url":"https://api.github.com/users/Agares4/gists{/gist_id}","starred_url":"https://api.github.com/users/Agares4/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Agares4/subscriptions","organizations_url":"https://api.github.com/users/Agares4/orgs","repos_url":"https://api.github.com/users/Agares4/repos","events_url":"https://api.github.com/users/Agares4/events{/privacy}","received_events_url":"https://api.github.com/users/Agares4/received_events","type":"User","site_admin":false},"body":"Added \"summary\" table under reports:\r\n![zrzut ekranu z 2016-01-15 o 12 29 44](https://cloud.githubusercontent.com/assets/15697510/12352313/2464d93e-bb85-11e5-8253-b8991c584ce2.png)","created_at":"2016-01-15T11:40:31Z","updated_at":"2016-01-15T12:26:13Z","closed_at":null,"merged_at":null,"merge_commit_sha":"2c42b8b4a40197ed7e21602bca7331019e2f0257","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/94/commits","review_comments_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/94/comments","review_comment_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/comments{/number}","comments_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues/94/comments","statuses_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/statuses/21aefdde2ad0cad3975b3879d146511e0f841fdd","head":{"label":"compucorp:PCHR-788-summary-in-reports","ref":"PCHR-788-summary-in-reports","sha":"21aefdde2ad0cad3975b3879d146511e0f841fdd","user":{"login":"compucorp","id":2040164,"avatar_url":"https://avatars.githubusercontent.com/u/2040164?v=3","gravatar_id":"","url":"https://api.github.com/users/compucorp","html_url":"https://github.com/compucorp","followers_url":"https://api.github.com/users/compucorp/followers","following_url":"https://api.github.com/users/compucorp/following{/other_user}","gists_url":"https://api.github.com/users/compucorp/gists{/gist_id}","starred_url":"https://api.github.com/users/compucorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compucorp/subscriptions","organizations_url":"https://api.github.com/users/compucorp/orgs","repos_url":"https://api.github.com/users/compucorp/repos","events_url":"https://api.github.com/users/compucorp/events{/privacy}","received_events_url":"https://api.github.com/users/compucorp/received_events","type":"Organization","site_admin":false},"repo":{"id":25817866,"name":"civihr-employee-portal","full_name":"compucorp/civihr-employee-portal","owner":{"login":"compucorp","id":2040164,"avatar_url":"https://avatars.githubusercontent.com/u/2040164?v=3","gravatar_id":"","url":"https://api.github.com/users/compucorp","html_url":"https://github.com/compucorp","followers_url":"https://api.github.com/users/compucorp/followers","following_url":"https://api.github.com/users/compucorp/following{/other_user}","gists_url":"https://api.github.com/users/compucorp/gists{/gist_id}","starred_url":"https://api.github.com/users/compucorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compucorp/subscriptions","organizations_url":"https://api.github.com/users/compucorp/orgs","repos_url":"https://api.github.com/users/compucorp/repos","events_url":"https://api.github.com/users/compucorp/events{/privacy}","received_events_url":"https://api.github.com/users/compucorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/compucorp/civihr-employee-portal","description":"CiviHR employee portal custom Drupal modules","fork":false,"url":"https://api.github.com/repos/compucorp/civihr-employee-portal","forks_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/forks","keys_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/teams","hooks_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/hooks","issue_events_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues/events{/number}","events_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/events","assignees_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/assignees{/user}","branches_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/branches{/branch}","tags_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/tags","blobs_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/languages","stargazers_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/stargazers","contributors_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/contributors","subscribers_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/subscribers","subscription_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/subscription","commits_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/contents/{+path}","compare_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/merges","archive_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/downloads","issues_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues{/number}","pulls_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/labels{/name}","releases_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/releases{/id}","created_at":"2014-10-27T12:26:29Z","updated_at":"2016-01-11T11:00:35Z","pushed_at":"2016-01-15T11:40:32Z","git_url":"git://github.com/compucorp/civihr-employee-portal.git","ssh_url":"git@github.com:compucorp/civihr-employee-portal.git","clone_url":"https://github.com/compucorp/civihr-employee-portal.git","svn_url":"https://github.com/compucorp/civihr-employee-portal","homepage":null,"size":1602,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"develop"}},"base":{"label":"compucorp:develop","ref":"develop","sha":"d7ed6c05d0a526c8348779454c91d728d9745674","user":{"login":"compucorp","id":2040164,"avatar_url":"https://avatars.githubusercontent.com/u/2040164?v=3","gravatar_id":"","url":"https://api.github.com/users/compucorp","html_url":"https://github.com/compucorp","followers_url":"https://api.github.com/users/compucorp/followers","following_url":"https://api.github.com/users/compucorp/following{/other_user}","gists_url":"https://api.github.com/users/compucorp/gists{/gist_id}","starred_url":"https://api.github.com/users/compucorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compucorp/subscriptions","organizations_url":"https://api.github.com/users/compucorp/orgs","repos_url":"https://api.github.com/users/compucorp/repos","events_url":"https://api.github.com/users/compucorp/events{/privacy}","received_events_url":"https://api.github.com/users/compucorp/received_events","type":"Organization","site_admin":false},"repo":{"id":25817866,"name":"civihr-employee-portal","full_name":"compucorp/civihr-employee-portal","owner":{"login":"compucorp","id":2040164,"avatar_url":"https://avatars.githubusercontent.com/u/2040164?v=3","gravatar_id":"","url":"https://api.github.com/users/compucorp","html_url":"https://github.com/compucorp","followers_url":"https://api.github.com/users/compucorp/followers","following_url":"https://api.github.com/users/compucorp/following{/other_user}","gists_url":"https://api.github.com/users/compucorp/gists{/gist_id}","starred_url":"https://api.github.com/users/compucorp/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/compucorp/subscriptions","organizations_url":"https://api.github.com/users/compucorp/orgs","repos_url":"https://api.github.com/users/compucorp/repos","events_url":"https://api.github.com/users/compucorp/events{/privacy}","received_events_url":"https://api.github.com/users/compucorp/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/compucorp/civihr-employee-portal","description":"CiviHR employee portal custom Drupal modules","fork":false,"url":"https://api.github.com/repos/compucorp/civihr-employee-portal","forks_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/forks","keys_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/keys{/key_id}","collaborators_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/teams","hooks_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/hooks","issue_events_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues/events{/number}","events_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/events","assignees_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/assignees{/user}","branches_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/branches{/branch}","tags_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/tags","blobs_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/refs{/sha}","trees_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/trees{/sha}","statuses_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/statuses/{sha}","languages_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/languages","stargazers_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/stargazers","contributors_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/contributors","subscribers_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/subscribers","subscription_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/subscription","commits_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/commits{/sha}","git_commits_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/git/commits{/sha}","comments_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/comments{/number}","issue_comment_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues/comments{/number}","contents_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/contents/{+path}","compare_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/compare/{base}...{head}","merges_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/merges","archive_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/downloads","issues_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues{/number}","pulls_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls{/number}","milestones_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/milestones{/number}","notifications_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/labels{/name}","releases_url":"https://api.github.com/repos/compucorp/civihr-employee-portal/releases{/id}","created_at":"2014-10-27T12:26:29Z","updated_at":"2016-01-11T11:00:35Z","pushed_at":"2016-01-15T11:40:32Z","git_url":"git://github.com/compucorp/civihr-employee-portal.git","ssh_url":"git@github.com:compucorp/civihr-employee-portal.git","clone_url":"https://github.com/compucorp/civihr-employee-portal.git","svn_url":"https://github.com/compucorp/civihr-employee-portal","homepage":null,"size":1602,"stargazers_count":2,"watchers_count":2,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":2,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/94"},"html":{"href":"https://github.com/compucorp/civihr-employee-portal/pull/94"},"issue":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues/94"},"comments":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/issues/94/comments"},"review_comments":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/94/comments"},"review_comment":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/pulls/94/commits"},"statuses":{"href":"https://api.github.com/repos/compucorp/civihr-employee-portal/statuses/21aefdde2ad0cad3975b3879d146511e0f841fdd"}}}}