{"action":"created","comment":{"url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/comments/238818121","pull_request_review_id":181453934,"id":238818121,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODgxODEyMQ==","diff_hunk":"@@ -0,0 +1,207 @@\n+import React, { Component } from 'react';\n+import { graphql } from 'react-apollo';\n+import moment from 'moment';\n+\n+import ButtonSecondary from 'components/Shared/Button/ButtonSecondary';\n+import ButtonPrimary from 'components/Shared/Button/ButtonPrimary';\n+import Dropdown from 'components/Shared/Form/Dropdown';\n+import DatePicker from 'components/Shared/DatePicker';\n+import XIcon from 'components/Shared/Icons/XIcon';\n+import { ALL_COMMUNITIES_NAME, ALL_COMMUNITIES_INDEX } from 'constants/AppConstants';\n+import AllCommunitiesQuery from 'components/Shared/queries/AllCommunitiesQuery';\n+\n+class HistoryFilter extends Component {\n+  constructor(props) {\n+    super(props);\n+\n+    this.state = {\n+      communityId: props.communityId,\n+      dateLowerBound: props.dateLowerBound,\n+      dateLowerBoundKey: new Date().toISOString(),\n+      dateUpperBound: props.dateUpperBound,\n+      dateUpperBoundKey: new Date().toISOString(),\n+      inclusiveEndDate: props.inclusiveEndDate\n+    }\n+  }\n+\n+  clearLowerBound = () => {\n+    this.setState({dateLowerBound: null});\n+  }\n+\n+  clearUpperBound = () => {\n+    this.setState({dateUpperBound: null});\n+  }\n+\n+  dateLowerBoundChanged = (date) => {\n+    this.setState({\n+      dateLowerBound: date,\n+      dateLowerBoundKey: new Date().toISOString(),\n+    });\n+  }\n+\n+  dateUpperBoundChanged = (date) => {\n+    this.setState({\n+      dateUpperBound: date,\n+      dateUpperBoundKey: new Date().toISOString(),\n+    });\n+  }\n+\n+  inclusiveEndDateChanged = (value) => {\n+    this.setState({inclusiveEndDate: value});\n+  }\n+\n+  communityIdChanged = (e) => {\n+    this.setState({communityId: Number(e.target.value)});\n+  }\n+\n+  onSubmit = () => {\n+    this.props.applyFilter({\n+      communityId: this.state.communityId,\n+      dateLowerBound: this.state.dateLowerBound,\n+      dateUpperBound: this.state.dateUpperBound,\n+      inclusiveEndDate: this.state.inclusiveEndDate\n+    });\n+  }\n+\n+  onCancel = () => {\n+    this.setState((state, props) => {\n+      return {\n+        communityId: props.communityId,\n+        dateLowerBound: props.dateLowerBound,\n+        dateUpperBound: props.dateUpperBound,\n+        inclusiveEndDate: props.inclusiveEndDate\n+      }\n+    })\n+  }\n+\n+  render() {\n+    const {\n+      communityId,\n+      dateLowerBound,\n+      dateLowerBoundKey,\n+      dateUpperBound,\n+      dateUpperBoundKey,\n+      inclusiveEndDate,\n+    } = this.state;\n+\n+    let allCommunities;\n+    const communitiesLoading = !this.props.AllCommunitiesQuery || this.props.AllCommunitiesQuery.loading;\n+    if (communitiesLoading) {\n+      return <div>Loading...</div>\n+    }\n+    allCommunities = this.props.AllCommunitiesQuery.allCommunities.nodes.filter(node => node.id !== 1337 && node.id !== 9002);","path":"src/components/Dashboard/CrossingStatusHistory/CrossingStatusHistoryFilter.js","position":92,"original_position":92,"commit_id":"fc3fe88c97d3d3e5865674762f05c022e62fd755","original_commit_id":"fc3fe88c97d3d3e5865674762f05c022e62fd755","user":{"login":"Niicck","id":14187277,"node_id":"MDQ6VXNlcjE0MTg3Mjc3","avatar_url":"https://avatars3.githubusercontent.com/u/14187277?v=4","gravatar_id":"","url":"https://api.github.com/users/Niicck","html_url":"https://github.com/Niicck","followers_url":"https://api.github.com/users/Niicck/followers","following_url":"https://api.github.com/users/Niicck/following{/other_user}","gists_url":"https://api.github.com/users/Niicck/gists{/gist_id}","starred_url":"https://api.github.com/users/Niicck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Niicck/subscriptions","organizations_url":"https://api.github.com/users/Niicck/orgs","repos_url":"https://api.github.com/users/Niicck/repos","events_url":"https://api.github.com/users/Niicck/events{/privacy}","received_events_url":"https://api.github.com/users/Niicck/received_events","type":"User","site_admin":false},"body":"Yeah there's one other place where I'm doing that too. It's a temporary measure until I figure out a plan for Super_Admin_World and ALL.","created_at":"2018-12-04T20:04:26Z","updated_at":"2018-12-04T20:04:26Z","html_url":"https://github.com/cityofaustin/ctxfloods/pull/412#discussion_r238818121","pull_request_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/412","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/comments/238818121"},"html":{"href":"https://github.com/cityofaustin/ctxfloods/pull/412#discussion_r238818121"},"pull_request":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/412"}},"in_reply_to_id":238814460},"pull_request":{"url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/412","id":235808626,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM1ODA4NjI2","html_url":"https://github.com/cityofaustin/ctxfloods/pull/412","diff_url":"https://github.com/cityofaustin/ctxfloods/pull/412.diff","patch_url":"https://github.com/cityofaustin/ctxfloods/pull/412.patch","issue_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/412","number":412,"state":"open","locked":false,"title":"Issue 382: Filters for History Page","user":{"login":"Niicck","id":14187277,"node_id":"MDQ6VXNlcjE0MTg3Mjc3","avatar_url":"https://avatars3.githubusercontent.com/u/14187277?v=4","gravatar_id":"","url":"https://api.github.com/users/Niicck","html_url":"https://github.com/Niicck","followers_url":"https://api.github.com/users/Niicck/followers","following_url":"https://api.github.com/users/Niicck/following{/other_user}","gists_url":"https://api.github.com/users/Niicck/gists{/gist_id}","starred_url":"https://api.github.com/users/Niicck/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Niicck/subscriptions","organizations_url":"https://api.github.com/users/Niicck/orgs","repos_url":"https://api.github.com/users/Niicck/repos","events_url":"https://api.github.com/users/Niicck/events{/privacy}","received_events_url":"https://api.github.com/users/Niicck/received_events","type":"User","site_admin":false},"body":"We can now filter by date range and community on the History Page.\r\n\r\n<img width=\"1033\" alt=\"screen shot 2018-11-30 at 9 33 09 am\" src=\"https://user-images.githubusercontent.com/14187277/49444947-433c9900-f796-11e8-9066-d0615f67880c.png\">\r\n\r\nRelated Issue: #382 \r\nTest it at: http://ctxfloods-frontend-382-history.s3-website-us-east-1.amazonaws.com/dashboard/crossings/history\r\n\r\nBackend PR: https://github.com/cityofaustin/ctxfloods-backend/pull/50","created_at":"2018-12-04T13:29:07Z","updated_at":"2018-12-04T20:04:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"c65c3f830730111a85c161724ebb58795572d704","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/412/commits","review_comments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/412/comments","review_comment_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/comments{/number}","comments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/412/comments","statuses_url":"https://api.github.com/repos/cityofaustin/ctxfloods/statuses/fc3fe88c97d3d3e5865674762f05c022e62fd755","head":{"label":"cityofaustin:382-history","ref":"382-history","sha":"fc3fe88c97d3d3e5865674762f05c022e62fd755","user":{"login":"cityofaustin","id":4871648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NzE2NDg=","avatar_url":"https://avatars3.githubusercontent.com/u/4871648?v=4","gravatar_id":"","url":"https://api.github.com/users/cityofaustin","html_url":"https://github.com/cityofaustin","followers_url":"https://api.github.com/users/cityofaustin/followers","following_url":"https://api.github.com/users/cityofaustin/following{/other_user}","gists_url":"https://api.github.com/users/cityofaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/cityofaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cityofaustin/subscriptions","organizations_url":"https://api.github.com/users/cityofaustin/orgs","repos_url":"https://api.github.com/users/cityofaustin/repos","events_url":"https://api.github.com/users/cityofaustin/events{/privacy}","received_events_url":"https://api.github.com/users/cityofaustin/received_events","type":"Organization","site_admin":false},"repo":{"id":97150687,"node_id":"MDEwOlJlcG9zaXRvcnk5NzE1MDY4Nw==","name":"ctxfloods","full_name":"cityofaustin/ctxfloods","private":false,"owner":{"login":"cityofaustin","id":4871648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NzE2NDg=","avatar_url":"https://avatars3.githubusercontent.com/u/4871648?v=4","gravatar_id":"","url":"https://api.github.com/users/cityofaustin","html_url":"https://github.com/cityofaustin","followers_url":"https://api.github.com/users/cityofaustin/followers","following_url":"https://api.github.com/users/cityofaustin/following{/other_user}","gists_url":"https://api.github.com/users/cityofaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/cityofaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cityofaustin/subscriptions","organizations_url":"https://api.github.com/users/cityofaustin/orgs","repos_url":"https://api.github.com/users/cityofaustin/repos","events_url":"https://api.github.com/users/cityofaustin/events{/privacy}","received_events_url":"https://api.github.com/users/cityofaustin/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cityofaustin/ctxfloods","description":"Central Texas Floods","fork":false,"url":"https://api.github.com/repos/cityofaustin/ctxfloods","forks_url":"https://api.github.com/repos/cityofaustin/ctxfloods/forks","keys_url":"https://api.github.com/repos/cityofaustin/ctxfloods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cityofaustin/ctxfloods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cityofaustin/ctxfloods/teams","hooks_url":"https://api.github.com/repos/cityofaustin/ctxfloods/hooks","issue_events_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/events{/number}","events_url":"https://api.github.com/repos/cityofaustin/ctxfloods/events","assignees_url":"https://api.github.com/repos/cityofaustin/ctxfloods/assignees{/user}","branches_url":"https://api.github.com/repos/cityofaustin/ctxfloods/branches{/branch}","tags_url":"https://api.github.com/repos/cityofaustin/ctxfloods/tags","blobs_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/refs{/sha}","trees_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cityofaustin/ctxfloods/statuses/{sha}","languages_url":"https://api.github.com/repos/cityofaustin/ctxfloods/languages","stargazers_url":"https://api.github.com/repos/cityofaustin/ctxfloods/stargazers","contributors_url":"https://api.github.com/repos/cityofaustin/ctxfloods/contributors","subscribers_url":"https://api.github.com/repos/cityofaustin/ctxfloods/subscribers","subscription_url":"https://api.github.com/repos/cityofaustin/ctxfloods/subscription","commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/commits{/sha}","git_commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/commits{/sha}","comments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/comments{/number}","issue_comment_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/comments{/number}","contents_url":"https://api.github.com/repos/cityofaustin/ctxfloods/contents/{+path}","compare_url":"https://api.github.com/repos/cityofaustin/ctxfloods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cityofaustin/ctxfloods/merges","archive_url":"https://api.github.com/repos/cityofaustin/ctxfloods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cityofaustin/ctxfloods/downloads","issues_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues{/number}","pulls_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls{/number}","milestones_url":"https://api.github.com/repos/cityofaustin/ctxfloods/milestones{/number}","notifications_url":"https://api.github.com/repos/cityofaustin/ctxfloods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cityofaustin/ctxfloods/labels{/name}","releases_url":"https://api.github.com/repos/cityofaustin/ctxfloods/releases{/id}","deployments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/deployments","created_at":"2017-07-13T17:52:44Z","updated_at":"2018-12-04T13:20:18Z","pushed_at":"2018-12-04T18:01:44Z","git_url":"git://github.com/cityofaustin/ctxfloods.git","ssh_url":"git@github.com:cityofaustin/ctxfloods.git","clone_url":"https://github.com/cityofaustin/ctxfloods.git","svn_url":"https://github.com/cityofaustin/ctxfloods","homepage":"","size":3493,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":78,"license":null,"forks":3,"open_issues":78,"watchers":6,"default_branch":"dev"}},"base":{"label":"cityofaustin:dev","ref":"dev","sha":"410b41c06a0c29621c25201abc14deda09c3ead7","user":{"login":"cityofaustin","id":4871648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NzE2NDg=","avatar_url":"https://avatars3.githubusercontent.com/u/4871648?v=4","gravatar_id":"","url":"https://api.github.com/users/cityofaustin","html_url":"https://github.com/cityofaustin","followers_url":"https://api.github.com/users/cityofaustin/followers","following_url":"https://api.github.com/users/cityofaustin/following{/other_user}","gists_url":"https://api.github.com/users/cityofaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/cityofaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cityofaustin/subscriptions","organizations_url":"https://api.github.com/users/cityofaustin/orgs","repos_url":"https://api.github.com/users/cityofaustin/repos","events_url":"https://api.github.com/users/cityofaustin/events{/privacy}","received_events_url":"https://api.github.com/users/cityofaustin/received_events","type":"Organization","site_admin":false},"repo":{"id":97150687,"node_id":"MDEwOlJlcG9zaXRvcnk5NzE1MDY4Nw==","name":"ctxfloods","full_name":"cityofaustin/ctxfloods","private":false,"owner":{"login":"cityofaustin","id":4871648,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQ4NzE2NDg=","avatar_url":"https://avatars3.githubusercontent.com/u/4871648?v=4","gravatar_id":"","url":"https://api.github.com/users/cityofaustin","html_url":"https://github.com/cityofaustin","followers_url":"https://api.github.com/users/cityofaustin/followers","following_url":"https://api.github.com/users/cityofaustin/following{/other_user}","gists_url":"https://api.github.com/users/cityofaustin/gists{/gist_id}","starred_url":"https://api.github.com/users/cityofaustin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cityofaustin/subscriptions","organizations_url":"https://api.github.com/users/cityofaustin/orgs","repos_url":"https://api.github.com/users/cityofaustin/repos","events_url":"https://api.github.com/users/cityofaustin/events{/privacy}","received_events_url":"https://api.github.com/users/cityofaustin/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/cityofaustin/ctxfloods","description":"Central Texas Floods","fork":false,"url":"https://api.github.com/repos/cityofaustin/ctxfloods","forks_url":"https://api.github.com/repos/cityofaustin/ctxfloods/forks","keys_url":"https://api.github.com/repos/cityofaustin/ctxfloods/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cityofaustin/ctxfloods/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cityofaustin/ctxfloods/teams","hooks_url":"https://api.github.com/repos/cityofaustin/ctxfloods/hooks","issue_events_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/events{/number}","events_url":"https://api.github.com/repos/cityofaustin/ctxfloods/events","assignees_url":"https://api.github.com/repos/cityofaustin/ctxfloods/assignees{/user}","branches_url":"https://api.github.com/repos/cityofaustin/ctxfloods/branches{/branch}","tags_url":"https://api.github.com/repos/cityofaustin/ctxfloods/tags","blobs_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/refs{/sha}","trees_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cityofaustin/ctxfloods/statuses/{sha}","languages_url":"https://api.github.com/repos/cityofaustin/ctxfloods/languages","stargazers_url":"https://api.github.com/repos/cityofaustin/ctxfloods/stargazers","contributors_url":"https://api.github.com/repos/cityofaustin/ctxfloods/contributors","subscribers_url":"https://api.github.com/repos/cityofaustin/ctxfloods/subscribers","subscription_url":"https://api.github.com/repos/cityofaustin/ctxfloods/subscription","commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/commits{/sha}","git_commits_url":"https://api.github.com/repos/cityofaustin/ctxfloods/git/commits{/sha}","comments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/comments{/number}","issue_comment_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/comments{/number}","contents_url":"https://api.github.com/repos/cityofaustin/ctxfloods/contents/{+path}","compare_url":"https://api.github.com/repos/cityofaustin/ctxfloods/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cityofaustin/ctxfloods/merges","archive_url":"https://api.github.com/repos/cityofaustin/ctxfloods/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cityofaustin/ctxfloods/downloads","issues_url":"https://api.github.com/repos/cityofaustin/ctxfloods/issues{/number}","pulls_url":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls{/number}","milestones_url":"https://api.github.com/repos/cityofaustin/ctxfloods/milestones{/number}","notifications_url":"https://api.github.com/repos/cityofaustin/ctxfloods/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cityofaustin/ctxfloods/labels{/name}","releases_url":"https://api.github.com/repos/cityofaustin/ctxfloods/releases{/id}","deployments_url":"https://api.github.com/repos/cityofaustin/ctxfloods/deployments","created_at":"2017-07-13T17:52:44Z","updated_at":"2018-12-04T13:20:18Z","pushed_at":"2018-12-04T18:01:44Z","git_url":"git://github.com/cityofaustin/ctxfloods.git","ssh_url":"git@github.com:cityofaustin/ctxfloods.git","clone_url":"https://github.com/cityofaustin/ctxfloods.git","svn_url":"https://github.com/cityofaustin/ctxfloods","homepage":"","size":3493,"stargazers_count":6,"watchers_count":6,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"archived":false,"open_issues_count":78,"license":null,"forks":3,"open_issues":78,"watchers":6,"default_branch":"dev"}},"_links":{"self":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/412"},"html":{"href":"https://github.com/cityofaustin/ctxfloods/pull/412"},"issue":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/412"},"comments":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/issues/412/comments"},"review_comments":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/412/comments"},"review_comment":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/pulls/412/commits"},"statuses":{"href":"https://api.github.com/repos/cityofaustin/ctxfloods/statuses/fc3fe88c97d3d3e5865674762f05c022e62fd755"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Niicck"}}