{"action":"created","comment":{"url":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/comments/220784582","pull_request_review_id":159272376,"id":220784582,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIyMDc4NDU4Mg==","diff_hunk":"@@ -0,0 +1,80 @@\n+import Ember from \"ember\";\n+import AjaxPromise from 'browse/utils/ajax-promise';\n+const { getOwner } = Ember;\n+\n+export default Ember.Controller.extend({\n+  queryParams: ['orgId'],\n+\n+  authenticate:Ember.inject.controller(),\n+  messageBox: Ember.inject.service(),\n+  organisationId: Ember.computed.alias('model.organisation.id'),\n+  organisationsUserId: Ember.computed.alias('model.organisationsUser.id'),\n+  userTitle: Ember.computed.alias('model.user.title'),\n+\n+  selectedTitle: Ember.computed('userTitle', function (){\n+    return{ name: this.get('userTitle'), id: this.get('userTitle')};\n+  }),\n+\n+  titles: Ember.computed(function(){\n+    return [\n+      { name: \"Mr\", id: \"Mr\" },\n+      { name: \"Mrs\", id: \"Mrs\" },\n+      { name: \"Miss\", id: \"Miss\" },\n+      { name: \"Ms\", id: \"Ms\" }\n+    ];\n+  }),\n+\n+  clearFormData() {\n+    this.set('organisationName', \"\");\n+    this.set('firstName', \"\");\n+    this.set('lastName', \"\");\n+    this.set('mobile', \"\");\n+    this.set('email', \"\");\n+    this.set('title', \"\");\n+    this.set('position', \"\");\n+  },\n+\n+  redirectToTransitionOrBrowse() {\n+    var attemptedTransition = this.get('authenticate').get('attemptedTransition');\n+    if (attemptedTransition) {\n+      this.set('attemptedTransition', null);\n+      attemptedTransition.retry();\n+    }else{\n+      this.transitionToRoute(\"browse\");\n+    }\n+  },\n+\n+  actions: {\n+    saveAccount() {\n+      var loadingView = getOwner(this).lookup('component:loading').append();\n+      var mobilePhone = this.get('model.user.mobile');\n+      var firstName = this.get('model.user.firstName');\n+      var lastName = this.get('model.user.lastName');\n+      var organisationId = this.get('organisationId');\n+      var position = this.get('model.organisationsUser.position');\n+      var email = this.get('model.user.email');\n+      var title = this.get('selectedTitle.name');\n+      new AjaxPromise(\"/organisations_users\", \"POST\", this.get('session.authToken'), { organisations_user: {\n+        organisation_id: organisationId, position: position, user_attributes: { first_name: firstName,\n+        last_name: lastName, mobile: mobilePhone, email: email, title: title }}}).then(data =>{\n+          this.get(\"store\").pushPayload(data);\n+          this.clearFormData();\n+          this.redirectToTransitionOrBrowse();\n+      }).catch(xhr => {\n+        if (xhr.status === 422) {\n+          // this.get(\"messageBox\").alert(xhr.responseJSON.errors);\n+          this.redirectToTransitionOrBrowse();\n+        } else {\n+          throw xhr;","path":"app/controllers/account_details.js","position":68,"original_position":68,"commit_id":"2126123267b4dadaeefc3495e1a8ac689a0b496a","original_commit_id":"2126123267b4dadaeefc3495e1a8ac689a0b496a","user":{"login":"Darshan-Chauhan","id":18572215,"node_id":"MDQ6VXNlcjE4NTcyMjE1","avatar_url":"https://avatars2.githubusercontent.com/u/18572215?v=4","gravatar_id":"","url":"https://api.github.com/users/Darshan-Chauhan","html_url":"https://github.com/Darshan-Chauhan","followers_url":"https://api.github.com/users/Darshan-Chauhan/followers","following_url":"https://api.github.com/users/Darshan-Chauhan/following{/other_user}","gists_url":"https://api.github.com/users/Darshan-Chauhan/gists{/gist_id}","starred_url":"https://api.github.com/users/Darshan-Chauhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Darshan-Chauhan/subscriptions","organizations_url":"https://api.github.com/users/Darshan-Chauhan/orgs","repos_url":"https://api.github.com/users/Darshan-Chauhan/repos","events_url":"https://api.github.com/users/Darshan-Chauhan/events{/privacy}","received_events_url":"https://api.github.com/users/Darshan-Chauhan/received_events","type":"User","site_admin":false},"body":"Any reason for throwing an exception rather than showing using `messageBox`??","created_at":"2018-09-27T03:32:05Z","updated_at":"2018-09-27T03:58:59Z","html_url":"https://github.com/crossroads/browse.goodcity/pull/207#discussion_r220784582","pull_request_url":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/207","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/comments/220784582"},"html":{"href":"https://github.com/crossroads/browse.goodcity/pull/207#discussion_r220784582"},"pull_request":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/207"}}},"pull_request":{"url":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/207","id":218360718,"node_id":"MDExOlB1bGxSZXF1ZXN0MjE4MzYwNzE4","html_url":"https://github.com/crossroads/browse.goodcity/pull/207","diff_url":"https://github.com/crossroads/browse.goodcity/pull/207.diff","patch_url":"https://github.com/crossroads/browse.goodcity/pull/207.patch","issue_url":"https://api.github.com/repos/crossroads/browse.goodcity/issues/207","number":207,"state":"open","locked":false,"title":"GCW-2132-New User Signup feature added","user":{"login":"abulsayyad123","id":37627094,"node_id":"MDQ6VXNlcjM3NjI3MDk0","avatar_url":"https://avatars3.githubusercontent.com/u/37627094?v=4","gravatar_id":"","url":"https://api.github.com/users/abulsayyad123","html_url":"https://github.com/abulsayyad123","followers_url":"https://api.github.com/users/abulsayyad123/followers","following_url":"https://api.github.com/users/abulsayyad123/following{/other_user}","gists_url":"https://api.github.com/users/abulsayyad123/gists{/gist_id}","starred_url":"https://api.github.com/users/abulsayyad123/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/abulsayyad123/subscriptions","organizations_url":"https://api.github.com/users/abulsayyad123/orgs","repos_url":"https://api.github.com/users/abulsayyad123/repos","events_url":"https://api.github.com/users/abulsayyad123/events{/privacy}","received_events_url":"https://api.github.com/users/abulsayyad123/received_events","type":"User","site_admin":false},"body":"Hi Team,\r\nThis is PR for New User Sign up feature. https://jira.crossroads.org.hk/browse/GCW-2132.\r\nAnd some other changes added which includes.\r\n- User account details page added.\r\n- Search GC organisation page added for account details page.\r\n- User redirection to browse and account-details page according to completion of user details.\r\n- Test cases added.\r\n- New styling added according to new mockup design.\r\n\r\nPlease review this PR and let me know if any change is required.\r\n\r\nThanks","created_at":"2018-09-26T15:28:14Z","updated_at":"2018-09-27T03:58:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"befb0341c2781bdaf2890eabd8258ed10fc44147","assignee":null,"assignees":[],"requested_reviewers":[{"login":"namrataukirde","id":8424592,"node_id":"MDQ6VXNlcjg0MjQ1OTI=","avatar_url":"https://avatars3.githubusercontent.com/u/8424592?v=4","gravatar_id":"","url":"https://api.github.com/users/namrataukirde","html_url":"https://github.com/namrataukirde","followers_url":"https://api.github.com/users/namrataukirde/followers","following_url":"https://api.github.com/users/namrataukirde/following{/other_user}","gists_url":"https://api.github.com/users/namrataukirde/gists{/gist_id}","starred_url":"https://api.github.com/users/namrataukirde/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/namrataukirde/subscriptions","organizations_url":"https://api.github.com/users/namrataukirde/orgs","repos_url":"https://api.github.com/users/namrataukirde/repos","events_url":"https://api.github.com/users/namrataukirde/events{/privacy}","received_events_url":"https://api.github.com/users/namrataukirde/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/207/commits","review_comments_url":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/207/comments","review_comment_url":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/comments{/number}","comments_url":"https://api.github.com/repos/crossroads/browse.goodcity/issues/207/comments","statuses_url":"https://api.github.com/repos/crossroads/browse.goodcity/statuses/2126123267b4dadaeefc3495e1a8ac689a0b496a","head":{"label":"crossroads:GCW-2132-new-user-can-sign-up","ref":"GCW-2132-new-user-can-sign-up","sha":"2126123267b4dadaeefc3495e1a8ac689a0b496a","user":{"login":"crossroads","id":141971,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTk3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/141971?v=4","gravatar_id":"","url":"https://api.github.com/users/crossroads","html_url":"https://github.com/crossroads","followers_url":"https://api.github.com/users/crossroads/followers","following_url":"https://api.github.com/users/crossroads/following{/other_user}","gists_url":"https://api.github.com/users/crossroads/gists{/gist_id}","starred_url":"https://api.github.com/users/crossroads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crossroads/subscriptions","organizations_url":"https://api.github.com/users/crossroads/orgs","repos_url":"https://api.github.com/users/crossroads/repos","events_url":"https://api.github.com/users/crossroads/events{/privacy}","received_events_url":"https://api.github.com/users/crossroads/received_events","type":"Organization","site_admin":false},"repo":{"id":38884704,"node_id":"MDEwOlJlcG9zaXRvcnkzODg4NDcwNA==","name":"browse.goodcity","full_name":"crossroads/browse.goodcity","private":false,"owner":{"login":"crossroads","id":141971,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTk3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/141971?v=4","gravatar_id":"","url":"https://api.github.com/users/crossroads","html_url":"https://github.com/crossroads","followers_url":"https://api.github.com/users/crossroads/followers","following_url":"https://api.github.com/users/crossroads/following{/other_user}","gists_url":"https://api.github.com/users/crossroads/gists{/gist_id}","starred_url":"https://api.github.com/users/crossroads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crossroads/subscriptions","organizations_url":"https://api.github.com/users/crossroads/orgs","repos_url":"https://api.github.com/users/crossroads/repos","events_url":"https://api.github.com/users/crossroads/events{/privacy}","received_events_url":"https://api.github.com/users/crossroads/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/crossroads/browse.goodcity","description":"GoodCity Web Interface ","fork":false,"url":"https://api.github.com/repos/crossroads/browse.goodcity","forks_url":"https://api.github.com/repos/crossroads/browse.goodcity/forks","keys_url":"https://api.github.com/repos/crossroads/browse.goodcity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crossroads/browse.goodcity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crossroads/browse.goodcity/teams","hooks_url":"https://api.github.com/repos/crossroads/browse.goodcity/hooks","issue_events_url":"https://api.github.com/repos/crossroads/browse.goodcity/issues/events{/number}","events_url":"https://api.github.com/repos/crossroads/browse.goodcity/events","assignees_url":"https://api.github.com/repos/crossroads/browse.goodcity/assignees{/user}","branches_url":"https://api.github.com/repos/crossroads/browse.goodcity/branches{/branch}","tags_url":"https://api.github.com/repos/crossroads/browse.goodcity/tags","blobs_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/refs{/sha}","trees_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crossroads/browse.goodcity/statuses/{sha}","languages_url":"https://api.github.com/repos/crossroads/browse.goodcity/languages","stargazers_url":"https://api.github.com/repos/crossroads/browse.goodcity/stargazers","contributors_url":"https://api.github.com/repos/crossroads/browse.goodcity/contributors","subscribers_url":"https://api.github.com/repos/crossroads/browse.goodcity/subscribers","subscription_url":"https://api.github.com/repos/crossroads/browse.goodcity/subscription","commits_url":"https://api.github.com/repos/crossroads/browse.goodcity/commits{/sha}","git_commits_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/commits{/sha}","comments_url":"https://api.github.com/repos/crossroads/browse.goodcity/comments{/number}","issue_comment_url":"https://api.github.com/repos/crossroads/browse.goodcity/issues/comments{/number}","contents_url":"https://api.github.com/repos/crossroads/browse.goodcity/contents/{+path}","compare_url":"https://api.github.com/repos/crossroads/browse.goodcity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crossroads/browse.goodcity/merges","archive_url":"https://api.github.com/repos/crossroads/browse.goodcity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crossroads/browse.goodcity/downloads","issues_url":"https://api.github.com/repos/crossroads/browse.goodcity/issues{/number}","pulls_url":"https://api.github.com/repos/crossroads/browse.goodcity/pulls{/number}","milestones_url":"https://api.github.com/repos/crossroads/browse.goodcity/milestones{/number}","notifications_url":"https://api.github.com/repos/crossroads/browse.goodcity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crossroads/browse.goodcity/labels{/name}","releases_url":"https://api.github.com/repos/crossroads/browse.goodcity/releases{/id}","deployments_url":"https://api.github.com/repos/crossroads/browse.goodcity/deployments","created_at":"2015-07-10T14:32:07Z","updated_at":"2018-09-26T10:04:24Z","pushed_at":"2018-09-26T15:28:15Z","git_url":"git://github.com/crossroads/browse.goodcity.git","ssh_url":"git@github.com:crossroads/browse.goodcity.git","clone_url":"https://github.com/crossroads/browse.goodcity.git","svn_url":"https://github.com/crossroads/browse.goodcity","homepage":null,"size":5248,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"base":{"label":"crossroads:master","ref":"master","sha":"c21b9db83d3799f292e160688024053e793e6dfa","user":{"login":"crossroads","id":141971,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTk3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/141971?v=4","gravatar_id":"","url":"https://api.github.com/users/crossroads","html_url":"https://github.com/crossroads","followers_url":"https://api.github.com/users/crossroads/followers","following_url":"https://api.github.com/users/crossroads/following{/other_user}","gists_url":"https://api.github.com/users/crossroads/gists{/gist_id}","starred_url":"https://api.github.com/users/crossroads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crossroads/subscriptions","organizations_url":"https://api.github.com/users/crossroads/orgs","repos_url":"https://api.github.com/users/crossroads/repos","events_url":"https://api.github.com/users/crossroads/events{/privacy}","received_events_url":"https://api.github.com/users/crossroads/received_events","type":"Organization","site_admin":false},"repo":{"id":38884704,"node_id":"MDEwOlJlcG9zaXRvcnkzODg4NDcwNA==","name":"browse.goodcity","full_name":"crossroads/browse.goodcity","private":false,"owner":{"login":"crossroads","id":141971,"node_id":"MDEyOk9yZ2FuaXphdGlvbjE0MTk3MQ==","avatar_url":"https://avatars0.githubusercontent.com/u/141971?v=4","gravatar_id":"","url":"https://api.github.com/users/crossroads","html_url":"https://github.com/crossroads","followers_url":"https://api.github.com/users/crossroads/followers","following_url":"https://api.github.com/users/crossroads/following{/other_user}","gists_url":"https://api.github.com/users/crossroads/gists{/gist_id}","starred_url":"https://api.github.com/users/crossroads/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/crossroads/subscriptions","organizations_url":"https://api.github.com/users/crossroads/orgs","repos_url":"https://api.github.com/users/crossroads/repos","events_url":"https://api.github.com/users/crossroads/events{/privacy}","received_events_url":"https://api.github.com/users/crossroads/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/crossroads/browse.goodcity","description":"GoodCity Web Interface ","fork":false,"url":"https://api.github.com/repos/crossroads/browse.goodcity","forks_url":"https://api.github.com/repos/crossroads/browse.goodcity/forks","keys_url":"https://api.github.com/repos/crossroads/browse.goodcity/keys{/key_id}","collaborators_url":"https://api.github.com/repos/crossroads/browse.goodcity/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/crossroads/browse.goodcity/teams","hooks_url":"https://api.github.com/repos/crossroads/browse.goodcity/hooks","issue_events_url":"https://api.github.com/repos/crossroads/browse.goodcity/issues/events{/number}","events_url":"https://api.github.com/repos/crossroads/browse.goodcity/events","assignees_url":"https://api.github.com/repos/crossroads/browse.goodcity/assignees{/user}","branches_url":"https://api.github.com/repos/crossroads/browse.goodcity/branches{/branch}","tags_url":"https://api.github.com/repos/crossroads/browse.goodcity/tags","blobs_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/refs{/sha}","trees_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/trees{/sha}","statuses_url":"https://api.github.com/repos/crossroads/browse.goodcity/statuses/{sha}","languages_url":"https://api.github.com/repos/crossroads/browse.goodcity/languages","stargazers_url":"https://api.github.com/repos/crossroads/browse.goodcity/stargazers","contributors_url":"https://api.github.com/repos/crossroads/browse.goodcity/contributors","subscribers_url":"https://api.github.com/repos/crossroads/browse.goodcity/subscribers","subscription_url":"https://api.github.com/repos/crossroads/browse.goodcity/subscription","commits_url":"https://api.github.com/repos/crossroads/browse.goodcity/commits{/sha}","git_commits_url":"https://api.github.com/repos/crossroads/browse.goodcity/git/commits{/sha}","comments_url":"https://api.github.com/repos/crossroads/browse.goodcity/comments{/number}","issue_comment_url":"https://api.github.com/repos/crossroads/browse.goodcity/issues/comments{/number}","contents_url":"https://api.github.com/repos/crossroads/browse.goodcity/contents/{+path}","compare_url":"https://api.github.com/repos/crossroads/browse.goodcity/compare/{base}...{head}","merges_url":"https://api.github.com/repos/crossroads/browse.goodcity/merges","archive_url":"https://api.github.com/repos/crossroads/browse.goodcity/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/crossroads/browse.goodcity/downloads","issues_url":"https://api.github.com/repos/crossroads/browse.goodcity/issues{/number}","pulls_url":"https://api.github.com/repos/crossroads/browse.goodcity/pulls{/number}","milestones_url":"https://api.github.com/repos/crossroads/browse.goodcity/milestones{/number}","notifications_url":"https://api.github.com/repos/crossroads/browse.goodcity/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/crossroads/browse.goodcity/labels{/name}","releases_url":"https://api.github.com/repos/crossroads/browse.goodcity/releases{/id}","deployments_url":"https://api.github.com/repos/crossroads/browse.goodcity/deployments","created_at":"2015-07-10T14:32:07Z","updated_at":"2018-09-26T10:04:24Z","pushed_at":"2018-09-26T15:28:15Z","git_url":"git://github.com/crossroads/browse.goodcity.git","ssh_url":"git@github.com:crossroads/browse.goodcity.git","clone_url":"https://github.com/crossroads/browse.goodcity.git","svn_url":"https://github.com/crossroads/browse.goodcity","homepage":null,"size":5248,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":1,"license":null,"forks":4,"open_issues":1,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/207"},"html":{"href":"https://github.com/crossroads/browse.goodcity/pull/207"},"issue":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/issues/207"},"comments":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/issues/207/comments"},"review_comments":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/207/comments"},"review_comment":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/pulls/207/commits"},"statuses":{"href":"https://api.github.com/repos/crossroads/browse.goodcity/statuses/2126123267b4dadaeefc3495e1a8ac689a0b496a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Darshan-Chauhan"}}