{"action":"created","comment":{"url":"https://api.github.com/repos/kprakobkit/pos/pulls/comments/45571608","id":45571608,"diff_hunk":"@@ -42,57 +41,22 @@ class OrderDetails extends Component {\n     this.setState({ order });\n   }\n \n-  toggleForm() {\n-    this.setState({ showAddEntry: !this.state.showAddEntry });\n-  }\n-\n-  renderEntry(entry, i) {\n-    return entry.status !== constants.CANCELED ?\n-      Entry(\n-        _.extend({}, entry, {\n-          key: i,\n-          index: i,\n-          changeEntryStatus: this.props.changeEntryStatus.bind(null, this.props.params.id)\n-        })\n-      ) :\n-      null;\n-  }\n-\n   render() {\n     return (\n       dom.div(\n         null,\n         dom.h1({ className: 'order-title' }, `Order #${this.props.params.id}`),\n         dom.h2({ className: 'order-status' }, `Status: ${this.state.order.status}`),\n-        dom.button(\n-          { className: 'toggle-add-entry btn btn-info btn-lg btn-block', onClick: this.toggleForm },\n-          this.state.showAddEntry ? 'Close' : 'Add more items'\n-        ),\n-        this.state.showAddEntry ? MasterItems({\n-          masterItems: this.props.masterItems,\n-          handleSubmit: this.props.addEntriesToOrder.bind(null, this.props.params.id)\n-        }) : null,\n-        dom.br(null),\n-        dom.div(\n-          { className: 'order-entries' },\n-          dom.table(\n-            { className: 'table table-striped' },\n-            dom.tbody(\n-              null,\n-              this.state.order.entries.map(this.renderEntry)\n-            )\n-          )\n-        ),\n-        Link(\n-          { to: '/orders', className: 'orders-link' },\n-          dom.p(\n-            null,\n-            dom.button(\n-              { className: 'btn btn-danger btn-lg btn-block' },\n-              'Back'\n-            )\n-          )\n-        )\n+        this.state.order.status == constants.OPEN ?\n+          OpenOrder(\n+            {\n+              order: this.state.order,\n+              masterItems: this.props.masterItems,\n+              addEntriesToOrder: this.props.addEntriesToOrder.bind(null, this.props.params.id),\n+              changeEntryStatus: this.props.changeEntryStatus.bind(null, this.props.params.id)\n+            }\n+          ) :\n+          ProcessingOrder({ order: this.state.order })","path":"src/components/OrderDetails.js","position":96,"original_position":96,"commit_id":"422313b0ac498fc2fb748fd7ae6c6aa560eba223","original_commit_id":"422313b0ac498fc2fb748fd7ae6c6aa560eba223","user":{"login":"achiu8","id":8070175,"avatar_url":"https://avatars.githubusercontent.com/u/8070175?v=3","gravatar_id":"","url":"https://api.github.com/users/achiu8","html_url":"https://github.com/achiu8","followers_url":"https://api.github.com/users/achiu8/followers","following_url":"https://api.github.com/users/achiu8/following{/other_user}","gists_url":"https://api.github.com/users/achiu8/gists{/gist_id}","starred_url":"https://api.github.com/users/achiu8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achiu8/subscriptions","organizations_url":"https://api.github.com/users/achiu8/orgs","repos_url":"https://api.github.com/users/achiu8/repos","events_url":"https://api.github.com/users/achiu8/events{/privacy}","received_events_url":"https://api.github.com/users/achiu8/received_events","type":"User","site_admin":false},"body":"Yeah. Maybe we should come up with a better naming scheme..","created_at":"2015-11-23T04:06:42Z","updated_at":"2015-11-23T04:06:42Z","html_url":"https://github.com/kprakobkit/pos/pull/50#discussion_r45571608","pull_request_url":"https://api.github.com/repos/kprakobkit/pos/pulls/50","_links":{"self":{"href":"https://api.github.com/repos/kprakobkit/pos/pulls/comments/45571608"},"html":{"href":"https://github.com/kprakobkit/pos/pull/50#discussion_r45571608"},"pull_request":{"href":"https://api.github.com/repos/kprakobkit/pos/pulls/50"}}},"pull_request":{"url":"https://api.github.com/repos/kprakobkit/pos/pulls/50","id":51479680,"html_url":"https://github.com/kprakobkit/pos/pull/50","diff_url":"https://github.com/kprakobkit/pos/pull/50.diff","patch_url":"https://github.com/kprakobkit/pos/pull/50.patch","issue_url":"https://api.github.com/repos/kprakobkit/pos/issues/50","number":50,"state":"open","locked":false,"title":"Processing order page","user":{"login":"achiu8","id":8070175,"avatar_url":"https://avatars.githubusercontent.com/u/8070175?v=3","gravatar_id":"","url":"https://api.github.com/users/achiu8","html_url":"https://github.com/achiu8","followers_url":"https://api.github.com/users/achiu8/followers","following_url":"https://api.github.com/users/achiu8/following{/other_user}","gists_url":"https://api.github.com/users/achiu8/gists{/gist_id}","starred_url":"https://api.github.com/users/achiu8/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achiu8/subscriptions","organizations_url":"https://api.github.com/users/achiu8/orgs","repos_url":"https://api.github.com/users/achiu8/repos","events_url":"https://api.github.com/users/achiu8/events{/privacy}","received_events_url":"https://api.github.com/users/achiu8/received_events","type":"User","site_admin":false},"body":"WIP and no tests yet (I know, terrible..), but wanted to see if you thought this was the correct approach. Basically, `OrderDetails` conditionally renders `OpenOrder` or `ProcessingOrder` body depending on status. Or do you think processing an order for payment should use a completely different page / route? ","created_at":"2015-11-23T00:18:34Z","updated_at":"2015-11-23T04:06:42Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c6558ecf4d3853a7f15f7557bbf6998d7467f25e","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/kprakobkit/pos/pulls/50/commits","review_comments_url":"https://api.github.com/repos/kprakobkit/pos/pulls/50/comments","review_comment_url":"https://api.github.com/repos/kprakobkit/pos/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kprakobkit/pos/issues/50/comments","statuses_url":"https://api.github.com/repos/kprakobkit/pos/statuses/422313b0ac498fc2fb748fd7ae6c6aa560eba223","head":{"label":"kprakobkit:processing-order-page","ref":"processing-order-page","sha":"422313b0ac498fc2fb748fd7ae6c6aa560eba223","user":{"login":"kprakobkit","id":1305229,"avatar_url":"https://avatars.githubusercontent.com/u/1305229?v=3","gravatar_id":"","url":"https://api.github.com/users/kprakobkit","html_url":"https://github.com/kprakobkit","followers_url":"https://api.github.com/users/kprakobkit/followers","following_url":"https://api.github.com/users/kprakobkit/following{/other_user}","gists_url":"https://api.github.com/users/kprakobkit/gists{/gist_id}","starred_url":"https://api.github.com/users/kprakobkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kprakobkit/subscriptions","organizations_url":"https://api.github.com/users/kprakobkit/orgs","repos_url":"https://api.github.com/users/kprakobkit/repos","events_url":"https://api.github.com/users/kprakobkit/events{/privacy}","received_events_url":"https://api.github.com/users/kprakobkit/received_events","type":"User","site_admin":false},"repo":{"id":44217194,"name":"pos","full_name":"kprakobkit/pos","owner":{"login":"kprakobkit","id":1305229,"avatar_url":"https://avatars.githubusercontent.com/u/1305229?v=3","gravatar_id":"","url":"https://api.github.com/users/kprakobkit","html_url":"https://github.com/kprakobkit","followers_url":"https://api.github.com/users/kprakobkit/followers","following_url":"https://api.github.com/users/kprakobkit/following{/other_user}","gists_url":"https://api.github.com/users/kprakobkit/gists{/gist_id}","starred_url":"https://api.github.com/users/kprakobkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kprakobkit/subscriptions","organizations_url":"https://api.github.com/users/kprakobkit/orgs","repos_url":"https://api.github.com/users/kprakobkit/repos","events_url":"https://api.github.com/users/kprakobkit/events{/privacy}","received_events_url":"https://api.github.com/users/kprakobkit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kprakobkit/pos","description":"","fork":false,"url":"https://api.github.com/repos/kprakobkit/pos","forks_url":"https://api.github.com/repos/kprakobkit/pos/forks","keys_url":"https://api.github.com/repos/kprakobkit/pos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kprakobkit/pos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kprakobkit/pos/teams","hooks_url":"https://api.github.com/repos/kprakobkit/pos/hooks","issue_events_url":"https://api.github.com/repos/kprakobkit/pos/issues/events{/number}","events_url":"https://api.github.com/repos/kprakobkit/pos/events","assignees_url":"https://api.github.com/repos/kprakobkit/pos/assignees{/user}","branches_url":"https://api.github.com/repos/kprakobkit/pos/branches{/branch}","tags_url":"https://api.github.com/repos/kprakobkit/pos/tags","blobs_url":"https://api.github.com/repos/kprakobkit/pos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kprakobkit/pos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kprakobkit/pos/git/refs{/sha}","trees_url":"https://api.github.com/repos/kprakobkit/pos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kprakobkit/pos/statuses/{sha}","languages_url":"https://api.github.com/repos/kprakobkit/pos/languages","stargazers_url":"https://api.github.com/repos/kprakobkit/pos/stargazers","contributors_url":"https://api.github.com/repos/kprakobkit/pos/contributors","subscribers_url":"https://api.github.com/repos/kprakobkit/pos/subscribers","subscription_url":"https://api.github.com/repos/kprakobkit/pos/subscription","commits_url":"https://api.github.com/repos/kprakobkit/pos/commits{/sha}","git_commits_url":"https://api.github.com/repos/kprakobkit/pos/git/commits{/sha}","comments_url":"https://api.github.com/repos/kprakobkit/pos/comments{/number}","issue_comment_url":"https://api.github.com/repos/kprakobkit/pos/issues/comments{/number}","contents_url":"https://api.github.com/repos/kprakobkit/pos/contents/{+path}","compare_url":"https://api.github.com/repos/kprakobkit/pos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kprakobkit/pos/merges","archive_url":"https://api.github.com/repos/kprakobkit/pos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kprakobkit/pos/downloads","issues_url":"https://api.github.com/repos/kprakobkit/pos/issues{/number}","pulls_url":"https://api.github.com/repos/kprakobkit/pos/pulls{/number}","milestones_url":"https://api.github.com/repos/kprakobkit/pos/milestones{/number}","notifications_url":"https://api.github.com/repos/kprakobkit/pos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kprakobkit/pos/labels{/name}","releases_url":"https://api.github.com/repos/kprakobkit/pos/releases{/id}","created_at":"2015-10-14T01:47:29Z","updated_at":"2015-10-24T05:02:39Z","pushed_at":"2015-11-23T00:49:35Z","git_url":"git://github.com/kprakobkit/pos.git","ssh_url":"git@github.com:kprakobkit/pos.git","clone_url":"https://github.com/kprakobkit/pos.git","svn_url":"https://github.com/kprakobkit/pos","homepage":null,"size":387,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"base":{"label":"kprakobkit:master","ref":"master","sha":"07193db5803c3d3166346b718bd7a536c57bfa80","user":{"login":"kprakobkit","id":1305229,"avatar_url":"https://avatars.githubusercontent.com/u/1305229?v=3","gravatar_id":"","url":"https://api.github.com/users/kprakobkit","html_url":"https://github.com/kprakobkit","followers_url":"https://api.github.com/users/kprakobkit/followers","following_url":"https://api.github.com/users/kprakobkit/following{/other_user}","gists_url":"https://api.github.com/users/kprakobkit/gists{/gist_id}","starred_url":"https://api.github.com/users/kprakobkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kprakobkit/subscriptions","organizations_url":"https://api.github.com/users/kprakobkit/orgs","repos_url":"https://api.github.com/users/kprakobkit/repos","events_url":"https://api.github.com/users/kprakobkit/events{/privacy}","received_events_url":"https://api.github.com/users/kprakobkit/received_events","type":"User","site_admin":false},"repo":{"id":44217194,"name":"pos","full_name":"kprakobkit/pos","owner":{"login":"kprakobkit","id":1305229,"avatar_url":"https://avatars.githubusercontent.com/u/1305229?v=3","gravatar_id":"","url":"https://api.github.com/users/kprakobkit","html_url":"https://github.com/kprakobkit","followers_url":"https://api.github.com/users/kprakobkit/followers","following_url":"https://api.github.com/users/kprakobkit/following{/other_user}","gists_url":"https://api.github.com/users/kprakobkit/gists{/gist_id}","starred_url":"https://api.github.com/users/kprakobkit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kprakobkit/subscriptions","organizations_url":"https://api.github.com/users/kprakobkit/orgs","repos_url":"https://api.github.com/users/kprakobkit/repos","events_url":"https://api.github.com/users/kprakobkit/events{/privacy}","received_events_url":"https://api.github.com/users/kprakobkit/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kprakobkit/pos","description":"","fork":false,"url":"https://api.github.com/repos/kprakobkit/pos","forks_url":"https://api.github.com/repos/kprakobkit/pos/forks","keys_url":"https://api.github.com/repos/kprakobkit/pos/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kprakobkit/pos/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kprakobkit/pos/teams","hooks_url":"https://api.github.com/repos/kprakobkit/pos/hooks","issue_events_url":"https://api.github.com/repos/kprakobkit/pos/issues/events{/number}","events_url":"https://api.github.com/repos/kprakobkit/pos/events","assignees_url":"https://api.github.com/repos/kprakobkit/pos/assignees{/user}","branches_url":"https://api.github.com/repos/kprakobkit/pos/branches{/branch}","tags_url":"https://api.github.com/repos/kprakobkit/pos/tags","blobs_url":"https://api.github.com/repos/kprakobkit/pos/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kprakobkit/pos/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kprakobkit/pos/git/refs{/sha}","trees_url":"https://api.github.com/repos/kprakobkit/pos/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kprakobkit/pos/statuses/{sha}","languages_url":"https://api.github.com/repos/kprakobkit/pos/languages","stargazers_url":"https://api.github.com/repos/kprakobkit/pos/stargazers","contributors_url":"https://api.github.com/repos/kprakobkit/pos/contributors","subscribers_url":"https://api.github.com/repos/kprakobkit/pos/subscribers","subscription_url":"https://api.github.com/repos/kprakobkit/pos/subscription","commits_url":"https://api.github.com/repos/kprakobkit/pos/commits{/sha}","git_commits_url":"https://api.github.com/repos/kprakobkit/pos/git/commits{/sha}","comments_url":"https://api.github.com/repos/kprakobkit/pos/comments{/number}","issue_comment_url":"https://api.github.com/repos/kprakobkit/pos/issues/comments{/number}","contents_url":"https://api.github.com/repos/kprakobkit/pos/contents/{+path}","compare_url":"https://api.github.com/repos/kprakobkit/pos/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kprakobkit/pos/merges","archive_url":"https://api.github.com/repos/kprakobkit/pos/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kprakobkit/pos/downloads","issues_url":"https://api.github.com/repos/kprakobkit/pos/issues{/number}","pulls_url":"https://api.github.com/repos/kprakobkit/pos/pulls{/number}","milestones_url":"https://api.github.com/repos/kprakobkit/pos/milestones{/number}","notifications_url":"https://api.github.com/repos/kprakobkit/pos/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kprakobkit/pos/labels{/name}","releases_url":"https://api.github.com/repos/kprakobkit/pos/releases{/id}","created_at":"2015-10-14T01:47:29Z","updated_at":"2015-10-24T05:02:39Z","pushed_at":"2015-11-23T00:49:35Z","git_url":"git://github.com/kprakobkit/pos.git","ssh_url":"git@github.com:kprakobkit/pos.git","clone_url":"https://github.com/kprakobkit/pos.git","svn_url":"https://github.com/kprakobkit/pos","homepage":null,"size":387,"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":2,"forks":0,"open_issues":2,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kprakobkit/pos/pulls/50"},"html":{"href":"https://github.com/kprakobkit/pos/pull/50"},"issue":{"href":"https://api.github.com/repos/kprakobkit/pos/issues/50"},"comments":{"href":"https://api.github.com/repos/kprakobkit/pos/issues/50/comments"},"review_comments":{"href":"https://api.github.com/repos/kprakobkit/pos/pulls/50/comments"},"review_comment":{"href":"https://api.github.com/repos/kprakobkit/pos/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kprakobkit/pos/pulls/50/commits"},"statuses":{"href":"https://api.github.com/repos/kprakobkit/pos/statuses/422313b0ac498fc2fb748fd7ae6c6aa560eba223"}}}}