{"action":"created","comment":{"url":"https://api.github.com/repos/calblueprint/sjc/pulls/comments/169831176","pull_request_review_id":98415811,"id":169831176,"diff_hunk":"@@ -0,0 +1,183 @@\n+class RegisterClient extends React.Component {\n+\n+  constructor(props) {\n+    super();\n+    this.state = {success: null};\n+    this.select = this.select.bind(this);\n+    this.renderSelections = this.renderSelections.bind(this);\n+    this.InputGroup = this.InputGroup.bind(this);\n+    this.InputField = this.InputField.bind(this);\n+  }\n+\n+  InputField({ id, label, help, ...props }) {\n+    const { Checkbox, Radio, FormGroup, ControlLabel, FormControl, Button, HelpBlock } = ReactBootstrap;\n+    return (\n+      <FormGroup controlId={id} onChange={this.select}>\n+        <ControlLabel>{label}</ControlLabel>\n+        <FormControl {...props} />\n+        {help && <HelpBlock>{help}</HelpBlock>}\n+      </FormGroup>\n+    );\n+  }\n+\n+  renderSelections(selections) {\n+    const { Checkbox, Radio, FormGroup, ControlLabel, FormControl, Button, HelpBlock } = ReactBootstrap;\n+    return selections.map((selection) => {\n+      return (\n+        <Radio name={selection.name} value={selection.value} inline>\n+          {selection.choice}\n+        </Radio>\n+      );\n+    });\n+  }\n+\n+  InputGroup({ id, label, help, inputs, ...props }) {\n+    const { Checkbox, Radio, FormGroup, ControlLabel, FormControl, Button, HelpBlock } = ReactBootstrap;\n+    return (\n+      <FormGroup controlId={id} onChange={this.select}>\n+        <ControlLabel >{label}</ControlLabel>\n+        {this.renderSelections(inputs)}\n+        {help && <HelpBlock>{help}</HelpBlock>}\n+      </FormGroup>\n+    );\n+  }\n+\n+  createClient = (evt) => {\n+    evt.preventDefault()\n+    const payload = {\n+      first_name: this.state.firstName,","path":"app/assets/javascripts/components/client/RegisterClient.jsx","position":48,"original_position":48,"commit_id":"4404a3ce11e2e9ed3e8f4e979ef34c64cc4522fa","original_commit_id":"4404a3ce11e2e9ed3e8f4e979ef34c64cc4522fa","user":{"login":"lbkchen","id":13477279,"avatar_url":"https://avatars0.githubusercontent.com/u/13477279?v=4","gravatar_id":"","url":"https://api.github.com/users/lbkchen","html_url":"https://github.com/lbkchen","followers_url":"https://api.github.com/users/lbkchen/followers","following_url":"https://api.github.com/users/lbkchen/following{/other_user}","gists_url":"https://api.github.com/users/lbkchen/gists{/gist_id}","starred_url":"https://api.github.com/users/lbkchen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lbkchen/subscriptions","organizations_url":"https://api.github.com/users/lbkchen/orgs","repos_url":"https://api.github.com/users/lbkchen/repos","events_url":"https://api.github.com/users/lbkchen/events{/privacy}","received_events_url":"https://api.github.com/users/lbkchen/received_events","type":"User","site_admin":false},"body":"how is dis being sent to the API? I feel like you need to wrap it in a field like: \r\n\r\n```javascript\r\nconst payload = {\r\n  client: {\r\n    first_name: ''\r\n    ...\r\n  } \r\n}\r\n```","created_at":"2018-02-22T01:22:50Z","updated_at":"2018-02-22T01:23:20Z","html_url":"https://github.com/calblueprint/sjc/pull/49#discussion_r169831176","pull_request_url":"https://api.github.com/repos/calblueprint/sjc/pulls/49","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/calblueprint/sjc/pulls/comments/169831176"},"html":{"href":"https://github.com/calblueprint/sjc/pull/49#discussion_r169831176"},"pull_request":{"href":"https://api.github.com/repos/calblueprint/sjc/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/calblueprint/sjc/pulls/49","id":170621783,"html_url":"https://github.com/calblueprint/sjc/pull/49","diff_url":"https://github.com/calblueprint/sjc/pull/49.diff","patch_url":"https://github.com/calblueprint/sjc/pull/49.patch","issue_url":"https://api.github.com/repos/calblueprint/sjc/issues/49","number":49,"state":"open","locked":false,"title":"Claire/register clients","user":{"login":"clairelin135","id":29110579,"avatar_url":"https://avatars1.githubusercontent.com/u/29110579?v=4","gravatar_id":"","url":"https://api.github.com/users/clairelin135","html_url":"https://github.com/clairelin135","followers_url":"https://api.github.com/users/clairelin135/followers","following_url":"https://api.github.com/users/clairelin135/following{/other_user}","gists_url":"https://api.github.com/users/clairelin135/gists{/gist_id}","starred_url":"https://api.github.com/users/clairelin135/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/clairelin135/subscriptions","organizations_url":"https://api.github.com/users/clairelin135/orgs","repos_url":"https://api.github.com/users/clairelin135/repos","events_url":"https://api.github.com/users/clairelin135/events{/privacy}","received_events_url":"https://api.github.com/users/clairelin135/received_events","type":"User","site_admin":false},"body":"### What does this PR do?\r\nAdds view for initial screening form for client onboarding. Creates fields for model. Adds routes to update client through form.\r\n\r\n### Status\r\nREADY\r\n\r\n### Migrations\r\nYES\r\n\r\n### Related PRs\r\nList related PRs against other branches:\r\nNone\r\n\r\n### Description of Testing Done\r\nAll radio buttons and text fields appropriately update, no authentication\r\n\r\n### Todos\r\n- [ ] Testing\r\n- [ ] Documentation/`annotate`\r\n\r\n### Screenshots\r\n<img width=\"705\" alt=\"screen shot 2018-02-21 at 3 53 56 pm\" src=\"https://user-images.githubusercontent.com/29110579/36512491-77241fd4-171f-11e8-97a9-c76c821c01a7.png\">\r\n\r\n","created_at":"2018-02-21T23:54:17Z","updated_at":"2018-02-22T01:23:20Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0e9fe330cfcdf564608302a8ec25ca596aa5e919","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/calblueprint/sjc/pulls/49/commits","review_comments_url":"https://api.github.com/repos/calblueprint/sjc/pulls/49/comments","review_comment_url":"https://api.github.com/repos/calblueprint/sjc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/calblueprint/sjc/issues/49/comments","statuses_url":"https://api.github.com/repos/calblueprint/sjc/statuses/4404a3ce11e2e9ed3e8f4e979ef34c64cc4522fa","head":{"label":"calblueprint:claire/register_clients","ref":"claire/register_clients","sha":"4404a3ce11e2e9ed3e8f4e979ef34c64cc4522fa","user":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars0.githubusercontent.com/u/2729578?v=4","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":104590631,"name":"sjc","full_name":"calblueprint/sjc","owner":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars0.githubusercontent.com/u/2729578?v=4","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calblueprint/sjc","description":"Web portal that allows Social Justice Collaborative attorneys to manage clients and their legal cases","fork":false,"url":"https://api.github.com/repos/calblueprint/sjc","forks_url":"https://api.github.com/repos/calblueprint/sjc/forks","keys_url":"https://api.github.com/repos/calblueprint/sjc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calblueprint/sjc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calblueprint/sjc/teams","hooks_url":"https://api.github.com/repos/calblueprint/sjc/hooks","issue_events_url":"https://api.github.com/repos/calblueprint/sjc/issues/events{/number}","events_url":"https://api.github.com/repos/calblueprint/sjc/events","assignees_url":"https://api.github.com/repos/calblueprint/sjc/assignees{/user}","branches_url":"https://api.github.com/repos/calblueprint/sjc/branches{/branch}","tags_url":"https://api.github.com/repos/calblueprint/sjc/tags","blobs_url":"https://api.github.com/repos/calblueprint/sjc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calblueprint/sjc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calblueprint/sjc/git/refs{/sha}","trees_url":"https://api.github.com/repos/calblueprint/sjc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calblueprint/sjc/statuses/{sha}","languages_url":"https://api.github.com/repos/calblueprint/sjc/languages","stargazers_url":"https://api.github.com/repos/calblueprint/sjc/stargazers","contributors_url":"https://api.github.com/repos/calblueprint/sjc/contributors","subscribers_url":"https://api.github.com/repos/calblueprint/sjc/subscribers","subscription_url":"https://api.github.com/repos/calblueprint/sjc/subscription","commits_url":"https://api.github.com/repos/calblueprint/sjc/commits{/sha}","git_commits_url":"https://api.github.com/repos/calblueprint/sjc/git/commits{/sha}","comments_url":"https://api.github.com/repos/calblueprint/sjc/comments{/number}","issue_comment_url":"https://api.github.com/repos/calblueprint/sjc/issues/comments{/number}","contents_url":"https://api.github.com/repos/calblueprint/sjc/contents/{+path}","compare_url":"https://api.github.com/repos/calblueprint/sjc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calblueprint/sjc/merges","archive_url":"https://api.github.com/repos/calblueprint/sjc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calblueprint/sjc/downloads","issues_url":"https://api.github.com/repos/calblueprint/sjc/issues{/number}","pulls_url":"https://api.github.com/repos/calblueprint/sjc/pulls{/number}","milestones_url":"https://api.github.com/repos/calblueprint/sjc/milestones{/number}","notifications_url":"https://api.github.com/repos/calblueprint/sjc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calblueprint/sjc/labels{/name}","releases_url":"https://api.github.com/repos/calblueprint/sjc/releases{/id}","deployments_url":"https://api.github.com/repos/calblueprint/sjc/deployments","created_at":"2017-09-23T18:42:19Z","updated_at":"2018-02-10T00:40:17Z","pushed_at":"2018-02-21T23:55:30Z","git_url":"git://github.com/calblueprint/sjc.git","ssh_url":"git@github.com:calblueprint/sjc.git","clone_url":"https://github.com/calblueprint/sjc.git","svn_url":"https://github.com/calblueprint/sjc","homepage":"","size":1131,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":8,"watchers":0,"default_branch":"master"}},"base":{"label":"calblueprint:master","ref":"master","sha":"c486c7491983a11cbc49606c54c70fbb067d4617","user":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars0.githubusercontent.com/u/2729578?v=4","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"repo":{"id":104590631,"name":"sjc","full_name":"calblueprint/sjc","owner":{"login":"calblueprint","id":2729578,"avatar_url":"https://avatars0.githubusercontent.com/u/2729578?v=4","gravatar_id":"","url":"https://api.github.com/users/calblueprint","html_url":"https://github.com/calblueprint","followers_url":"https://api.github.com/users/calblueprint/followers","following_url":"https://api.github.com/users/calblueprint/following{/other_user}","gists_url":"https://api.github.com/users/calblueprint/gists{/gist_id}","starred_url":"https://api.github.com/users/calblueprint/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/calblueprint/subscriptions","organizations_url":"https://api.github.com/users/calblueprint/orgs","repos_url":"https://api.github.com/users/calblueprint/repos","events_url":"https://api.github.com/users/calblueprint/events{/privacy}","received_events_url":"https://api.github.com/users/calblueprint/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/calblueprint/sjc","description":"Web portal that allows Social Justice Collaborative attorneys to manage clients and their legal cases","fork":false,"url":"https://api.github.com/repos/calblueprint/sjc","forks_url":"https://api.github.com/repos/calblueprint/sjc/forks","keys_url":"https://api.github.com/repos/calblueprint/sjc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/calblueprint/sjc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/calblueprint/sjc/teams","hooks_url":"https://api.github.com/repos/calblueprint/sjc/hooks","issue_events_url":"https://api.github.com/repos/calblueprint/sjc/issues/events{/number}","events_url":"https://api.github.com/repos/calblueprint/sjc/events","assignees_url":"https://api.github.com/repos/calblueprint/sjc/assignees{/user}","branches_url":"https://api.github.com/repos/calblueprint/sjc/branches{/branch}","tags_url":"https://api.github.com/repos/calblueprint/sjc/tags","blobs_url":"https://api.github.com/repos/calblueprint/sjc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/calblueprint/sjc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/calblueprint/sjc/git/refs{/sha}","trees_url":"https://api.github.com/repos/calblueprint/sjc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/calblueprint/sjc/statuses/{sha}","languages_url":"https://api.github.com/repos/calblueprint/sjc/languages","stargazers_url":"https://api.github.com/repos/calblueprint/sjc/stargazers","contributors_url":"https://api.github.com/repos/calblueprint/sjc/contributors","subscribers_url":"https://api.github.com/repos/calblueprint/sjc/subscribers","subscription_url":"https://api.github.com/repos/calblueprint/sjc/subscription","commits_url":"https://api.github.com/repos/calblueprint/sjc/commits{/sha}","git_commits_url":"https://api.github.com/repos/calblueprint/sjc/git/commits{/sha}","comments_url":"https://api.github.com/repos/calblueprint/sjc/comments{/number}","issue_comment_url":"https://api.github.com/repos/calblueprint/sjc/issues/comments{/number}","contents_url":"https://api.github.com/repos/calblueprint/sjc/contents/{+path}","compare_url":"https://api.github.com/repos/calblueprint/sjc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/calblueprint/sjc/merges","archive_url":"https://api.github.com/repos/calblueprint/sjc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/calblueprint/sjc/downloads","issues_url":"https://api.github.com/repos/calblueprint/sjc/issues{/number}","pulls_url":"https://api.github.com/repos/calblueprint/sjc/pulls{/number}","milestones_url":"https://api.github.com/repos/calblueprint/sjc/milestones{/number}","notifications_url":"https://api.github.com/repos/calblueprint/sjc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/calblueprint/sjc/labels{/name}","releases_url":"https://api.github.com/repos/calblueprint/sjc/releases{/id}","deployments_url":"https://api.github.com/repos/calblueprint/sjc/deployments","created_at":"2017-09-23T18:42:19Z","updated_at":"2018-02-10T00:40:17Z","pushed_at":"2018-02-21T23:55:30Z","git_url":"git://github.com/calblueprint/sjc.git","ssh_url":"git@github.com:calblueprint/sjc.git","clone_url":"https://github.com/calblueprint/sjc.git","svn_url":"https://github.com/calblueprint/sjc","homepage":"","size":1131,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":8,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":1,"open_issues":8,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/calblueprint/sjc/pulls/49"},"html":{"href":"https://github.com/calblueprint/sjc/pull/49"},"issue":{"href":"https://api.github.com/repos/calblueprint/sjc/issues/49"},"comments":{"href":"https://api.github.com/repos/calblueprint/sjc/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/calblueprint/sjc/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/calblueprint/sjc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/calblueprint/sjc/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/calblueprint/sjc/statuses/4404a3ce11e2e9ed3e8f4e979ef34c64cc4522fa"}},"author_association":"NONE"}}
{"actor":{"display_login":"lbkchen"}}