{"action":"created","comment":{"url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/comments/86433759","pull_request_review_id":7094389,"id":86433759,"diff_hunk":"@@ -51,32 +51,33 @@ class HealthCareApp extends React.Component {\n     return message;\n   }\n \n-  getUrl(direction) {\n+  getUrl(direction, markAsComplete) {\n     const routes = this.props.route.childRoutes;\n-    const panels = [];\n+    const paths = routes.map((d) => { return d.path; });\n     const data = this.props.data;\n-    let currentPath = this.props.location.pathname;\n-    let nextPath = '';\n \n+    let currentPath = this.props.location.pathname;\n     if (currentPath === '/') {\n       currentPath = '/introduction';\n     }\n+    const currentIndex = paths.indexOf(currentPath);\n+    const increment = direction === 'back' ? -1 : 1;\n \n-    const filtered = routes.filter(page => {\n-      return page.depends === undefined || _.matches(page.depends)(data);\n-    });\n-\n-\n-    panels.push.apply(panels, filtered.map((obj) => { return obj.path; }));\n-\n-    for (let i = 0; i < panels.length; i++) {\n-      if (currentPath === panels[i]) {\n-        if (direction === 'back') {\n-          nextPath = panels[i - 1];\n+    let nextPath = '';\n+    for (let i = currentIndex; i >= 0 && i <= routes.length; i += increment) {\n+      const route = routes[i + increment];\n+      if (route) {\n+        // Check to see if we should skip the next route\n+        if (route.depends !== undefined && !_.matches(route.depends)(data)) {","path":"src/client/components/HealthCareApp.jsx","position":32,"original_position":36,"commit_id":"9df6a6a8e09ff11e5cde6a3d5255f03e23475f49","original_commit_id":"26ed95adfa0f291627467f5624c92a3b6f6025f9","user":{"login":"alexose","id":627264,"avatar_url":"https://avatars.githubusercontent.com/u/627264?v=3","gravatar_id":"","url":"https://api.github.com/users/alexose","html_url":"https://github.com/alexose","followers_url":"https://api.github.com/users/alexose/followers","following_url":"https://api.github.com/users/alexose/following{/other_user}","gists_url":"https://api.github.com/users/alexose/gists{/gist_id}","starred_url":"https://api.github.com/users/alexose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexose/subscriptions","organizations_url":"https://api.github.com/users/alexose/orgs","repos_url":"https://api.github.com/users/alexose/repos","events_url":"https://api.github.com/users/alexose/events{/privacy}","received_events_url":"https://api.github.com/users/alexose/received_events","type":"User","site_admin":false},"body":"It's a bit of lodash magic.  It does a deep comparison between partial objects, so you can see if the properties match.","created_at":"2016-11-03T20:18:06Z","updated_at":"2016-11-03T20:18:06Z","html_url":"https://github.com/department-of-veterans-affairs/healthcare-application/pull/271#discussion_r86433759","pull_request_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/271","_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/comments/86433759"},"html":{"href":"https://github.com/department-of-veterans-affairs/healthcare-application/pull/271#discussion_r86433759"},"pull_request":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/271"}}},"pull_request":{"url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/271","id":92020214,"html_url":"https://github.com/department-of-veterans-affairs/healthcare-application/pull/271","diff_url":"https://github.com/department-of-veterans-affairs/healthcare-application/pull/271.diff","patch_url":"https://github.com/department-of-veterans-affairs/healthcare-application/pull/271.patch","issue_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues/271","number":271,"state":"open","locked":false,"title":"[WIP] Hca financial disclosure","user":{"login":"alexose","id":627264,"avatar_url":"https://avatars.githubusercontent.com/u/627264?v=3","gravatar_id":"","url":"https://api.github.com/users/alexose","html_url":"https://github.com/alexose","followers_url":"https://api.github.com/users/alexose/followers","following_url":"https://api.github.com/users/alexose/following{/other_user}","gists_url":"https://api.github.com/users/alexose/gists{/gist_id}","starred_url":"https://api.github.com/users/alexose/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/alexose/subscriptions","organizations_url":"https://api.github.com/users/alexose/orgs","repos_url":"https://api.github.com/users/alexose/repos","events_url":"https://api.github.com/users/alexose/events{/privacy}","received_events_url":"https://api.github.com/users/alexose/received_events","type":"User","site_admin":false},"body":"Addresses:\r\n\r\nhttps://github.com/department-of-veterans-affairs/healthcare-application-team/issues/487\r\nhttps://github.com/department-of-veterans-affairs/healthcare-application-team/issues/488\r\nhttps://github.com/department-of-veterans-affairs/healthcare-application-team/issues/489\r\n\r\n(Throwing this into a WIP pull request so I can watch the e2e tests run.)","created_at":"2016-11-02T17:41:11Z","updated_at":"2016-11-03T20:18:06Z","closed_at":null,"merged_at":null,"merge_commit_sha":"1c1f7ba6e41c2a307a4843389575e643a0c1a360","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/271/commits","review_comments_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/271/comments","review_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/comments{/number}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues/271/comments","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/statuses/9df6a6a8e09ff11e5cde6a3d5255f03e23475f49","head":{"label":"department-of-veterans-affairs:hca-financial-disclosure","ref":"hca-financial-disclosure","sha":"9df6a6a8e09ff11e5cde6a3d5255f03e23475f49","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":55422491,"name":"healthcare-application","full_name":"department-of-veterans-affairs/healthcare-application","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/healthcare-application","description":null,"fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/deployments","created_at":"2016-04-04T15:27:09Z","updated_at":"2016-10-31T15:00:09Z","pushed_at":"2016-11-03T20:07:54Z","git_url":"git://github.com/department-of-veterans-affairs/healthcare-application.git","ssh_url":"git@github.com:department-of-veterans-affairs/healthcare-application.git","clone_url":"https://github.com/department-of-veterans-affairs/healthcare-application.git","svn_url":"https://github.com/department-of-veterans-affairs/healthcare-application","homepage":null,"size":6133,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":17,"forks":3,"open_issues":17,"watchers":1,"default_branch":"master"}},"base":{"label":"department-of-veterans-affairs:master","ref":"master","sha":"a14676cb4490bb352e0e79e590cbc4b02d3aef37","user":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"repo":{"id":55422491,"name":"healthcare-application","full_name":"department-of-veterans-affairs/healthcare-application","owner":{"login":"department-of-veterans-affairs","id":5421563,"avatar_url":"https://avatars.githubusercontent.com/u/5421563?v=3","gravatar_id":"","url":"https://api.github.com/users/department-of-veterans-affairs","html_url":"https://github.com/department-of-veterans-affairs","followers_url":"https://api.github.com/users/department-of-veterans-affairs/followers","following_url":"https://api.github.com/users/department-of-veterans-affairs/following{/other_user}","gists_url":"https://api.github.com/users/department-of-veterans-affairs/gists{/gist_id}","starred_url":"https://api.github.com/users/department-of-veterans-affairs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/department-of-veterans-affairs/subscriptions","organizations_url":"https://api.github.com/users/department-of-veterans-affairs/orgs","repos_url":"https://api.github.com/users/department-of-veterans-affairs/repos","events_url":"https://api.github.com/users/department-of-veterans-affairs/events{/privacy}","received_events_url":"https://api.github.com/users/department-of-veterans-affairs/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/department-of-veterans-affairs/healthcare-application","description":null,"fork":false,"url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application","forks_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/forks","keys_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/keys{/key_id}","collaborators_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/teams","hooks_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/hooks","issue_events_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues/events{/number}","events_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/events","assignees_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/assignees{/user}","branches_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/branches{/branch}","tags_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/tags","blobs_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/refs{/sha}","trees_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/trees{/sha}","statuses_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/statuses/{sha}","languages_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/languages","stargazers_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/stargazers","contributors_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/contributors","subscribers_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/subscribers","subscription_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/subscription","commits_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/commits{/sha}","git_commits_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/git/commits{/sha}","comments_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/comments{/number}","issue_comment_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues/comments{/number}","contents_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/contents/{+path}","compare_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/compare/{base}...{head}","merges_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/merges","archive_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/downloads","issues_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues{/number}","pulls_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls{/number}","milestones_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/milestones{/number}","notifications_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/labels{/name}","releases_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/releases{/id}","deployments_url":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/deployments","created_at":"2016-04-04T15:27:09Z","updated_at":"2016-10-31T15:00:09Z","pushed_at":"2016-11-03T20:07:54Z","git_url":"git://github.com/department-of-veterans-affairs/healthcare-application.git","ssh_url":"git@github.com:department-of-veterans-affairs/healthcare-application.git","clone_url":"https://github.com/department-of-veterans-affairs/healthcare-application.git","svn_url":"https://github.com/department-of-veterans-affairs/healthcare-application","homepage":null,"size":6133,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":17,"forks":3,"open_issues":17,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/271"},"html":{"href":"https://github.com/department-of-veterans-affairs/healthcare-application/pull/271"},"issue":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues/271"},"comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/issues/271/comments"},"review_comments":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/271/comments"},"review_comment":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/pulls/271/commits"},"statuses":{"href":"https://api.github.com/repos/department-of-veterans-affairs/healthcare-application/statuses/9df6a6a8e09ff11e5cde6a3d5255f03e23475f49"}}}}
{"actor":{"display_login":"alexose"}}