{"action":"created","comment":{"url":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/comments/36380183","id":36380183,"diff_hunk":"@@ -72,25 +86,91 @@ $(document).ready(function(){\n     $('#screenName').text(screenName);\n   };\n \n-  PrintData.prototype.uncomingEvents = function() {\n+  PrintData.prototype.eventsTable = function() {\n+    var potentialEventsData = [];\n+    var upcomingEventsData = [];\n+    myEventData.forEach(function(eventData){\n+      if (eventData.going_ids.indexOf(authenticationData.user_id) === -1) {\n+        potentialEventsData.push(eventData);\n+      }else {\n+        upcomingEventsData.push(eventData);\n+      }\n+    });\n+    potentialEventsData.forEach(function(eventData){\n+      var organisationName = organisationsData.filter(function(e){\n+            return (e._id === eventData.organisation_id) ? true:false;","path":"public/js/my_event.js","position":54,"original_position":54,"commit_id":"b944849f802abdbb631597b62b3b4c997a6ed9e2","original_commit_id":"b944849f802abdbb631597b62b3b4c997a6ed9e2","user":{"login":"f3r","id":970858,"avatar_url":"https://avatars.githubusercontent.com/u/970858?v=3","gravatar_id":"","url":"https://api.github.com/users/f3r","html_url":"https://github.com/f3r","followers_url":"https://api.github.com/users/f3r/followers","following_url":"https://api.github.com/users/f3r/following{/other_user}","gists_url":"https://api.github.com/users/f3r/gists{/gist_id}","starred_url":"https://api.github.com/users/f3r/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f3r/subscriptions","organizations_url":"https://api.github.com/users/f3r/orgs","repos_url":"https://api.github.com/users/f3r/repos","events_url":"https://api.github.com/users/f3r/events{/privacy}","received_events_url":"https://api.github.com/users/f3r/received_events","type":"User","site_admin":false},"body":"```js\r\n return (e._id === eventData.organisation_id);\r\n```\r\n","created_at":"2015-08-06T04:18:09Z","updated_at":"2015-08-06T04:18:09Z","html_url":"https://github.com/WDI-HK-8/SocialChair/pull/5#discussion_r36380183","pull_request_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/5","_links":{"self":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/comments/36380183"},"html":{"href":"https://github.com/WDI-HK-8/SocialChair/pull/5#discussion_r36380183"},"pull_request":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/5"}}},"pull_request":{"url":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/5","id":41749398,"html_url":"https://github.com/WDI-HK-8/SocialChair/pull/5","diff_url":"https://github.com/WDI-HK-8/SocialChair/pull/5.diff","patch_url":"https://github.com/WDI-HK-8/SocialChair/pull/5.patch","issue_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues/5","number":5,"state":"open","locked":false,"title":"Pages","user":{"login":"kricli","id":13043141,"avatar_url":"https://avatars.githubusercontent.com/u/13043141?v=3","gravatar_id":"","url":"https://api.github.com/users/kricli","html_url":"https://github.com/kricli","followers_url":"https://api.github.com/users/kricli/followers","following_url":"https://api.github.com/users/kricli/following{/other_user}","gists_url":"https://api.github.com/users/kricli/gists{/gist_id}","starred_url":"https://api.github.com/users/kricli/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kricli/subscriptions","organizations_url":"https://api.github.com/users/kricli/orgs","repos_url":"https://api.github.com/users/kricli/repos","events_url":"https://api.github.com/users/kricli/events{/privacy}","received_events_url":"https://api.github.com/users/kricli/received_events","type":"User","site_admin":false},"body":"add edit profile function","created_at":"2015-08-06T03:43:19Z","updated_at":"2015-08-06T04:18:09Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ff34aee29d799812812f091480167bc0ef70b5a9","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/5/commits","review_comments_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/5/comments","review_comment_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/comments{/number}","comments_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues/5/comments","statuses_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/statuses/b944849f802abdbb631597b62b3b4c997a6ed9e2","head":{"label":"WDI-HK-8:pages","ref":"pages","sha":"b944849f802abdbb631597b62b3b4c997a6ed9e2","user":{"login":"WDI-HK-8","id":12110100,"avatar_url":"https://avatars.githubusercontent.com/u/12110100?v=3","gravatar_id":"","url":"https://api.github.com/users/WDI-HK-8","html_url":"https://github.com/WDI-HK-8","followers_url":"https://api.github.com/users/WDI-HK-8/followers","following_url":"https://api.github.com/users/WDI-HK-8/following{/other_user}","gists_url":"https://api.github.com/users/WDI-HK-8/gists{/gist_id}","starred_url":"https://api.github.com/users/WDI-HK-8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WDI-HK-8/subscriptions","organizations_url":"https://api.github.com/users/WDI-HK-8/orgs","repos_url":"https://api.github.com/users/WDI-HK-8/repos","events_url":"https://api.github.com/users/WDI-HK-8/events{/privacy}","received_events_url":"https://api.github.com/users/WDI-HK-8/received_events","type":"Organization","site_admin":false},"repo":{"id":39991780,"name":"SocialChair","full_name":"WDI-HK-8/SocialChair","owner":{"login":"WDI-HK-8","id":12110100,"avatar_url":"https://avatars.githubusercontent.com/u/12110100?v=3","gravatar_id":"","url":"https://api.github.com/users/WDI-HK-8","html_url":"https://github.com/WDI-HK-8","followers_url":"https://api.github.com/users/WDI-HK-8/followers","following_url":"https://api.github.com/users/WDI-HK-8/following{/other_user}","gists_url":"https://api.github.com/users/WDI-HK-8/gists{/gist_id}","starred_url":"https://api.github.com/users/WDI-HK-8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WDI-HK-8/subscriptions","organizations_url":"https://api.github.com/users/WDI-HK-8/orgs","repos_url":"https://api.github.com/users/WDI-HK-8/repos","events_url":"https://api.github.com/users/WDI-HK-8/events{/privacy}","received_events_url":"https://api.github.com/users/WDI-HK-8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WDI-HK-8/SocialChair","description":"","fork":false,"url":"https://api.github.com/repos/WDI-HK-8/SocialChair","forks_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/forks","keys_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/teams","hooks_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/hooks","issue_events_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues/events{/number}","events_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/events","assignees_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/assignees{/user}","branches_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/branches{/branch}","tags_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/tags","blobs_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/refs{/sha}","trees_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/statuses/{sha}","languages_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/languages","stargazers_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/stargazers","contributors_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/contributors","subscribers_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/subscribers","subscription_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/subscription","commits_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/commits{/sha}","git_commits_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/commits{/sha}","comments_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/comments{/number}","issue_comment_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues/comments{/number}","contents_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/contents/{+path}","compare_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/merges","archive_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/downloads","issues_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues{/number}","pulls_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls{/number}","milestones_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/milestones{/number}","notifications_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/labels{/name}","releases_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/releases{/id}","created_at":"2015-07-31T07:06:25Z","updated_at":"2015-08-01T08:36:46Z","pushed_at":"2015-08-06T03:43:19Z","git_url":"git://github.com/WDI-HK-8/SocialChair.git","ssh_url":"git@github.com:WDI-HK-8/SocialChair.git","clone_url":"https://github.com/WDI-HK-8/SocialChair.git","svn_url":"https://github.com/WDI-HK-8/SocialChair","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"WDI-HK-8:master","ref":"master","sha":"b0460897583afe6547e7525d214b405e45984e21","user":{"login":"WDI-HK-8","id":12110100,"avatar_url":"https://avatars.githubusercontent.com/u/12110100?v=3","gravatar_id":"","url":"https://api.github.com/users/WDI-HK-8","html_url":"https://github.com/WDI-HK-8","followers_url":"https://api.github.com/users/WDI-HK-8/followers","following_url":"https://api.github.com/users/WDI-HK-8/following{/other_user}","gists_url":"https://api.github.com/users/WDI-HK-8/gists{/gist_id}","starred_url":"https://api.github.com/users/WDI-HK-8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WDI-HK-8/subscriptions","organizations_url":"https://api.github.com/users/WDI-HK-8/orgs","repos_url":"https://api.github.com/users/WDI-HK-8/repos","events_url":"https://api.github.com/users/WDI-HK-8/events{/privacy}","received_events_url":"https://api.github.com/users/WDI-HK-8/received_events","type":"Organization","site_admin":false},"repo":{"id":39991780,"name":"SocialChair","full_name":"WDI-HK-8/SocialChair","owner":{"login":"WDI-HK-8","id":12110100,"avatar_url":"https://avatars.githubusercontent.com/u/12110100?v=3","gravatar_id":"","url":"https://api.github.com/users/WDI-HK-8","html_url":"https://github.com/WDI-HK-8","followers_url":"https://api.github.com/users/WDI-HK-8/followers","following_url":"https://api.github.com/users/WDI-HK-8/following{/other_user}","gists_url":"https://api.github.com/users/WDI-HK-8/gists{/gist_id}","starred_url":"https://api.github.com/users/WDI-HK-8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/WDI-HK-8/subscriptions","organizations_url":"https://api.github.com/users/WDI-HK-8/orgs","repos_url":"https://api.github.com/users/WDI-HK-8/repos","events_url":"https://api.github.com/users/WDI-HK-8/events{/privacy}","received_events_url":"https://api.github.com/users/WDI-HK-8/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/WDI-HK-8/SocialChair","description":"","fork":false,"url":"https://api.github.com/repos/WDI-HK-8/SocialChair","forks_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/forks","keys_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/keys{/key_id}","collaborators_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/teams","hooks_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/hooks","issue_events_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues/events{/number}","events_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/events","assignees_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/assignees{/user}","branches_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/branches{/branch}","tags_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/tags","blobs_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/refs{/sha}","trees_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/trees{/sha}","statuses_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/statuses/{sha}","languages_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/languages","stargazers_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/stargazers","contributors_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/contributors","subscribers_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/subscribers","subscription_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/subscription","commits_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/commits{/sha}","git_commits_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/git/commits{/sha}","comments_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/comments{/number}","issue_comment_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues/comments{/number}","contents_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/contents/{+path}","compare_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/compare/{base}...{head}","merges_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/merges","archive_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/downloads","issues_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues{/number}","pulls_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls{/number}","milestones_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/milestones{/number}","notifications_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/labels{/name}","releases_url":"https://api.github.com/repos/WDI-HK-8/SocialChair/releases{/id}","created_at":"2015-07-31T07:06:25Z","updated_at":"2015-08-01T08:36:46Z","pushed_at":"2015-08-06T03:43:19Z","git_url":"git://github.com/WDI-HK-8/SocialChair.git","ssh_url":"git@github.com:WDI-HK-8/SocialChair.git","clone_url":"https://github.com/WDI-HK-8/SocialChair.git","svn_url":"https://github.com/WDI-HK-8/SocialChair","homepage":null,"size":0,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":1,"forks":0,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/5"},"html":{"href":"https://github.com/WDI-HK-8/SocialChair/pull/5"},"issue":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues/5"},"comments":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/issues/5/comments"},"review_comments":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/5/comments"},"review_comment":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/pulls/5/commits"},"statuses":{"href":"https://api.github.com/repos/WDI-HK-8/SocialChair/statuses/b944849f802abdbb631597b62b3b4c997a6ed9e2"}}}}