{"action":"created","comment":{"url":"https://api.github.com/repos/bcgov/range-web/pulls/comments/176225864","pull_request_review_id":105892000,"id":176225864,"diff_hunk":"@@ -49,26 +52,44 @@ export class RangeUsePlan extends Component {\n     this.setState({ isPendingModalOpen: false });\n   }\n \n+  updateStatus = (statusName, closeConfirmModal) => {\n+    const { rangeUsePlan, statuses, updateRupStatus } = this.props;\n+    const status = statuses.find(status => status.name === statusName);\n+    const requestData = {\n+      agreementId: rangeUsePlan.id,\n+      statusId: status.id,\n+    }\n+\n+    updateRupStatus(requestData).then(closeConfirmModal);\n+  }\n+\n   onYesCompletedClicked = () => {\n-    const completed = this.props.statuses.find(status => status.name === COMPLETED);\n-    // console.log(completed)\n-    // TODO: make a network call with completed.id\n-    this.closeCompletedConfirmModal();\n+    this.updateStatus(COMPLETED, this.closeCompletedConfirmModal);\n+  }\n+\n+  onYesPendingClicked = () => {\n+    this.updateStatus(PENDING, this.closePendingConfirmModal);\n   }\n \n   render() {\n     const { isCompletedModalOpen, isPendingModalOpen } = this.state;\n-\n+    const { rangeUsePlan, isUpdatingStatus, newStatus } = this.props;\n     const statusDropdownOptions = [\n       { key: 1, text: COMPLETED, value: 1, onClick: this.openCompletedConfirmModal },\n       { key: 2, text: PENDING, value: 2, onClick: this.openPendingConfirmModal },\n     ];\n+\n     const { \n       agreementId, agreementStartDate, agreementEndDate,\n-      zone, rangeName, alternateBusinessName, planStartDate, planEndDate,\n-    } = this.props.rangeUsePlan;\n+      zone, rangeName, alternateBusinessName, \n+      planStartDate, planEndDate, status:currStatus,\n+      primaryAgreementHolder: currPAHolder,\n+    } = rangeUsePlan;","path":"src/components/rangeUsePlan/RangeUsePlan.js","position":61,"original_position":61,"commit_id":"610d1b6490b518225e9941102b6b7e2895660da8","original_commit_id":"610d1b6490b518225e9941102b6b7e2895660da8","user":{"login":"Kiesum","id":14823931,"avatar_url":"https://avatars1.githubusercontent.com/u/14823931?v=4","gravatar_id":"","url":"https://api.github.com/users/Kiesum","html_url":"https://github.com/Kiesum","followers_url":"https://api.github.com/users/Kiesum/followers","following_url":"https://api.github.com/users/Kiesum/following{/other_user}","gists_url":"https://api.github.com/users/Kiesum/gists{/gist_id}","starred_url":"https://api.github.com/users/Kiesum/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kiesum/subscriptions","organizations_url":"https://api.github.com/users/Kiesum/orgs","repos_url":"https://api.github.com/users/Kiesum/repos","events_url":"https://api.github.com/users/Kiesum/events{/privacy}","received_events_url":"https://api.github.com/users/Kiesum/received_events","type":"User","site_admin":false},"body":"I think it's best to put all on one line or each on it's own line but it's more just personal preference. ","created_at":"2018-03-21T20:24:01Z","updated_at":"2018-03-21T20:38:47Z","html_url":"https://github.com/bcgov/range-web/pull/17#discussion_r176225864","pull_request_url":"https://api.github.com/repos/bcgov/range-web/pulls/17","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/bcgov/range-web/pulls/comments/176225864"},"html":{"href":"https://github.com/bcgov/range-web/pull/17#discussion_r176225864"},"pull_request":{"href":"https://api.github.com/repos/bcgov/range-web/pulls/17"}}},"pull_request":{"url":"https://api.github.com/repos/bcgov/range-web/pulls/17","id":176597081,"html_url":"https://github.com/bcgov/range-web/pull/17","diff_url":"https://github.com/bcgov/range-web/pull/17.diff","patch_url":"https://github.com/bcgov/range-web/pull/17.patch","issue_url":"https://api.github.com/repos/bcgov/range-web/issues/17","number":17,"state":"open","locked":false,"title":"Feature/update status","user":{"login":"Kyubinhan","id":36203857,"avatar_url":"https://avatars1.githubusercontent.com/u/36203857?v=4","gravatar_id":"","url":"https://api.github.com/users/Kyubinhan","html_url":"https://github.com/Kyubinhan","followers_url":"https://api.github.com/users/Kyubinhan/followers","following_url":"https://api.github.com/users/Kyubinhan/following{/other_user}","gists_url":"https://api.github.com/users/Kyubinhan/gists{/gist_id}","starred_url":"https://api.github.com/users/Kyubinhan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Kyubinhan/subscriptions","organizations_url":"https://api.github.com/users/Kyubinhan/orgs","repos_url":"https://api.github.com/users/Kyubinhan/repos","events_url":"https://api.github.com/users/Kyubinhan/events{/privacy}","received_events_url":"https://api.github.com/users/Kyubinhan/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-03-21T20:14:43Z","updated_at":"2018-03-21T20:38:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0f12c3a3cf639d042e524782409243cef251e113","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/bcgov/range-web/pulls/17/commits","review_comments_url":"https://api.github.com/repos/bcgov/range-web/pulls/17/comments","review_comment_url":"https://api.github.com/repos/bcgov/range-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/bcgov/range-web/issues/17/comments","statuses_url":"https://api.github.com/repos/bcgov/range-web/statuses/610d1b6490b518225e9941102b6b7e2895660da8","head":{"label":"bcgov:feature/update-status","ref":"feature/update-status","sha":"610d1b6490b518225e9941102b6b7e2895660da8","user":{"login":"bcgov","id":916280,"avatar_url":"https://avatars1.githubusercontent.com/u/916280?v=4","gravatar_id":"","url":"https://api.github.com/users/bcgov","html_url":"https://github.com/bcgov","followers_url":"https://api.github.com/users/bcgov/followers","following_url":"https://api.github.com/users/bcgov/following{/other_user}","gists_url":"https://api.github.com/users/bcgov/gists{/gist_id}","starred_url":"https://api.github.com/users/bcgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcgov/subscriptions","organizations_url":"https://api.github.com/users/bcgov/orgs","repos_url":"https://api.github.com/users/bcgov/repos","events_url":"https://api.github.com/users/bcgov/events{/privacy}","received_events_url":"https://api.github.com/users/bcgov/received_events","type":"Organization","site_admin":false},"repo":{"id":120951690,"name":"range-web","full_name":"bcgov/range-web","owner":{"login":"bcgov","id":916280,"avatar_url":"https://avatars1.githubusercontent.com/u/916280?v=4","gravatar_id":"","url":"https://api.github.com/users/bcgov","html_url":"https://github.com/bcgov","followers_url":"https://api.github.com/users/bcgov/followers","following_url":"https://api.github.com/users/bcgov/following{/other_user}","gists_url":"https://api.github.com/users/bcgov/gists{/gist_id}","starred_url":"https://api.github.com/users/bcgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcgov/subscriptions","organizations_url":"https://api.github.com/users/bcgov/orgs","repos_url":"https://api.github.com/users/bcgov/repos","events_url":"https://api.github.com/users/bcgov/events{/privacy}","received_events_url":"https://api.github.com/users/bcgov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bcgov/range-web","description":null,"fork":false,"url":"https://api.github.com/repos/bcgov/range-web","forks_url":"https://api.github.com/repos/bcgov/range-web/forks","keys_url":"https://api.github.com/repos/bcgov/range-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcgov/range-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcgov/range-web/teams","hooks_url":"https://api.github.com/repos/bcgov/range-web/hooks","issue_events_url":"https://api.github.com/repos/bcgov/range-web/issues/events{/number}","events_url":"https://api.github.com/repos/bcgov/range-web/events","assignees_url":"https://api.github.com/repos/bcgov/range-web/assignees{/user}","branches_url":"https://api.github.com/repos/bcgov/range-web/branches{/branch}","tags_url":"https://api.github.com/repos/bcgov/range-web/tags","blobs_url":"https://api.github.com/repos/bcgov/range-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcgov/range-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcgov/range-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcgov/range-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcgov/range-web/statuses/{sha}","languages_url":"https://api.github.com/repos/bcgov/range-web/languages","stargazers_url":"https://api.github.com/repos/bcgov/range-web/stargazers","contributors_url":"https://api.github.com/repos/bcgov/range-web/contributors","subscribers_url":"https://api.github.com/repos/bcgov/range-web/subscribers","subscription_url":"https://api.github.com/repos/bcgov/range-web/subscription","commits_url":"https://api.github.com/repos/bcgov/range-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcgov/range-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcgov/range-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcgov/range-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcgov/range-web/contents/{+path}","compare_url":"https://api.github.com/repos/bcgov/range-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcgov/range-web/merges","archive_url":"https://api.github.com/repos/bcgov/range-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcgov/range-web/downloads","issues_url":"https://api.github.com/repos/bcgov/range-web/issues{/number}","pulls_url":"https://api.github.com/repos/bcgov/range-web/pulls{/number}","milestones_url":"https://api.github.com/repos/bcgov/range-web/milestones{/number}","notifications_url":"https://api.github.com/repos/bcgov/range-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcgov/range-web/labels{/name}","releases_url":"https://api.github.com/repos/bcgov/range-web/releases{/id}","deployments_url":"https://api.github.com/repos/bcgov/range-web/deployments","created_at":"2018-02-09T20:21:54Z","updated_at":"2018-03-14T17:48:26Z","pushed_at":"2018-03-21T20:14:44Z","git_url":"git://github.com/bcgov/range-web.git","ssh_url":"git@github.com:bcgov/range-web.git","clone_url":"https://github.com/bcgov/range-web.git","svn_url":"https://github.com/bcgov/range-web","homepage":null,"size":8827,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"bcgov:dev","ref":"dev","sha":"d39807801bcc1b6f79b47632542f24ffe0ffed6b","user":{"login":"bcgov","id":916280,"avatar_url":"https://avatars1.githubusercontent.com/u/916280?v=4","gravatar_id":"","url":"https://api.github.com/users/bcgov","html_url":"https://github.com/bcgov","followers_url":"https://api.github.com/users/bcgov/followers","following_url":"https://api.github.com/users/bcgov/following{/other_user}","gists_url":"https://api.github.com/users/bcgov/gists{/gist_id}","starred_url":"https://api.github.com/users/bcgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcgov/subscriptions","organizations_url":"https://api.github.com/users/bcgov/orgs","repos_url":"https://api.github.com/users/bcgov/repos","events_url":"https://api.github.com/users/bcgov/events{/privacy}","received_events_url":"https://api.github.com/users/bcgov/received_events","type":"Organization","site_admin":false},"repo":{"id":120951690,"name":"range-web","full_name":"bcgov/range-web","owner":{"login":"bcgov","id":916280,"avatar_url":"https://avatars1.githubusercontent.com/u/916280?v=4","gravatar_id":"","url":"https://api.github.com/users/bcgov","html_url":"https://github.com/bcgov","followers_url":"https://api.github.com/users/bcgov/followers","following_url":"https://api.github.com/users/bcgov/following{/other_user}","gists_url":"https://api.github.com/users/bcgov/gists{/gist_id}","starred_url":"https://api.github.com/users/bcgov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcgov/subscriptions","organizations_url":"https://api.github.com/users/bcgov/orgs","repos_url":"https://api.github.com/users/bcgov/repos","events_url":"https://api.github.com/users/bcgov/events{/privacy}","received_events_url":"https://api.github.com/users/bcgov/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/bcgov/range-web","description":null,"fork":false,"url":"https://api.github.com/repos/bcgov/range-web","forks_url":"https://api.github.com/repos/bcgov/range-web/forks","keys_url":"https://api.github.com/repos/bcgov/range-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bcgov/range-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bcgov/range-web/teams","hooks_url":"https://api.github.com/repos/bcgov/range-web/hooks","issue_events_url":"https://api.github.com/repos/bcgov/range-web/issues/events{/number}","events_url":"https://api.github.com/repos/bcgov/range-web/events","assignees_url":"https://api.github.com/repos/bcgov/range-web/assignees{/user}","branches_url":"https://api.github.com/repos/bcgov/range-web/branches{/branch}","tags_url":"https://api.github.com/repos/bcgov/range-web/tags","blobs_url":"https://api.github.com/repos/bcgov/range-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bcgov/range-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bcgov/range-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/bcgov/range-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bcgov/range-web/statuses/{sha}","languages_url":"https://api.github.com/repos/bcgov/range-web/languages","stargazers_url":"https://api.github.com/repos/bcgov/range-web/stargazers","contributors_url":"https://api.github.com/repos/bcgov/range-web/contributors","subscribers_url":"https://api.github.com/repos/bcgov/range-web/subscribers","subscription_url":"https://api.github.com/repos/bcgov/range-web/subscription","commits_url":"https://api.github.com/repos/bcgov/range-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/bcgov/range-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/bcgov/range-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/bcgov/range-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/bcgov/range-web/contents/{+path}","compare_url":"https://api.github.com/repos/bcgov/range-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bcgov/range-web/merges","archive_url":"https://api.github.com/repos/bcgov/range-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bcgov/range-web/downloads","issues_url":"https://api.github.com/repos/bcgov/range-web/issues{/number}","pulls_url":"https://api.github.com/repos/bcgov/range-web/pulls{/number}","milestones_url":"https://api.github.com/repos/bcgov/range-web/milestones{/number}","notifications_url":"https://api.github.com/repos/bcgov/range-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bcgov/range-web/labels{/name}","releases_url":"https://api.github.com/repos/bcgov/range-web/releases{/id}","deployments_url":"https://api.github.com/repos/bcgov/range-web/deployments","created_at":"2018-02-09T20:21:54Z","updated_at":"2018-03-14T17:48:26Z","pushed_at":"2018-03-21T20:14:44Z","git_url":"git://github.com/bcgov/range-web.git","ssh_url":"git@github.com:bcgov/range-web.git","clone_url":"https://github.com/bcgov/range-web.git","svn_url":"https://github.com/bcgov/range-web","homepage":null,"size":8827,"stargazers_count":3,"watchers_count":3,"language":null,"has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":2,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0"},"forks":2,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/bcgov/range-web/pulls/17"},"html":{"href":"https://github.com/bcgov/range-web/pull/17"},"issue":{"href":"https://api.github.com/repos/bcgov/range-web/issues/17"},"comments":{"href":"https://api.github.com/repos/bcgov/range-web/issues/17/comments"},"review_comments":{"href":"https://api.github.com/repos/bcgov/range-web/pulls/17/comments"},"review_comment":{"href":"https://api.github.com/repos/bcgov/range-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/bcgov/range-web/pulls/17/commits"},"statuses":{"href":"https://api.github.com/repos/bcgov/range-web/statuses/610d1b6490b518225e9941102b6b7e2895660da8"}},"author_association":"COLLABORATOR"}}
{"actor":{"display_login":"Kiesum"}}