{"action":"created","comment":{"url":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/comments/166132120","pull_request_review_id":94165628,"id":166132120,"diff_hunk":"@@ -52,27 +52,74 @@ class Index extends Component {\n     this.props.dispatch(setSelectedDate(dt.unix()));\n   };\n \n-  clearItems = () => {\n-    this.props.dispatch(clearAvailability());\n-  };\n-\n   render() {\n+    const { loading, user } = this.props;\n+\n+    if (loading || !user) {\n+      return (\n+        <Container>\n+          <Progress />\n+        </Container>\n+      );\n+    }\n+\n+    // are they part of any groups?\n+    if (user.groups.length === 0) {\n+      return (\n+        <Container>\n+          <Center>\n+            <Text>You are not part of any groups.</Text>\n+          </Center>\n+        </Container>\n+      );\n+    }\n+\n+    // do any of the groups have schedules?\n+    // expands to check date range of requests\n+    if (user.schedules.length === 0) {\n+      return (\n+        <Container>\n+          <Center>\n+            <Text>None of the groups you belong to have any open requests.</Text>\n+          </Center>\n+        </Container>\n+      );\n+    }\n+\n+    // move to redux filters alter\n     const momentDate = moment.unix(this.props.selectedDate);\n \n     // get start of week unix timestamp\n     const startOfWeek = momentDate\n       .clone()\n       .isoWeekday(1)\n-      .startOf('isoweek');\n+      .startOf('isoweek')\n+      .unix();\n+\n     const endOfWeek = momentDate\n       .clone()\n       .isoWeekday(1)\n-      .endOf('isoweek');\n+      .endOf('isoweek')\n+      .unix();\n \n-    // will be replaced by graphql calls\n-    const filteredItems = this.props.items.filter(\n-      item => item.startDateTime >= startOfWeek.unix() && item.startDateTime < endOfWeek.unix(),\n-    );\n+    const filteredItems = [];\n+    _.forEach(user.schedules, (schedule) => {","path":"client/src/screens/availability/Index.js","position":106,"original_position":106,"commit_id":"5da610722a967068d1bb4d8db973c66340ac5dab","original_commit_id":"5da610722a967068d1bb4d8db973c66340ac5dab","user":{"login":"sjmcculloch","id":19988272,"avatar_url":"https://avatars0.githubusercontent.com/u/19988272?v=4","gravatar_id":"","url":"https://api.github.com/users/sjmcculloch","html_url":"https://github.com/sjmcculloch","followers_url":"https://api.github.com/users/sjmcculloch/followers","following_url":"https://api.github.com/users/sjmcculloch/following{/other_user}","gists_url":"https://api.github.com/users/sjmcculloch/gists{/gist_id}","starred_url":"https://api.github.com/users/sjmcculloch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjmcculloch/subscriptions","organizations_url":"https://api.github.com/users/sjmcculloch/orgs","repos_url":"https://api.github.com/users/sjmcculloch/repos","events_url":"https://api.github.com/users/sjmcculloch/events{/privacy}","received_events_url":"https://api.github.com/users/sjmcculloch/received_events","type":"User","site_admin":false},"body":"Yes - I think you are right (future pull request to remove). ","created_at":"2018-02-05T22:26:47Z","updated_at":"2018-02-05T22:26:47Z","html_url":"https://github.com/NSWSESMembers/availability-poc/pull/174#discussion_r166132120","pull_request_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/174","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/comments/166132120"},"html":{"href":"https://github.com/NSWSESMembers/availability-poc/pull/174#discussion_r166132120"},"pull_request":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/174"}},"in_reply_to_id":166129671},"pull_request":{"url":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/174","id":167128981,"html_url":"https://github.com/NSWSESMembers/availability-poc/pull/174","diff_url":"https://github.com/NSWSESMembers/availability-poc/pull/174.diff","patch_url":"https://github.com/NSWSESMembers/availability-poc/pull/174.patch","issue_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues/174","number":174,"state":"open","locked":false,"title":"Smcculloch.graphql availability","user":{"login":"sjmcculloch","id":19988272,"avatar_url":"https://avatars0.githubusercontent.com/u/19988272?v=4","gravatar_id":"","url":"https://api.github.com/users/sjmcculloch","html_url":"https://github.com/sjmcculloch","followers_url":"https://api.github.com/users/sjmcculloch/followers","following_url":"https://api.github.com/users/sjmcculloch/following{/other_user}","gists_url":"https://api.github.com/users/sjmcculloch/gists{/gist_id}","starred_url":"https://api.github.com/users/sjmcculloch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sjmcculloch/subscriptions","organizations_url":"https://api.github.com/users/sjmcculloch/orgs","repos_url":"https://api.github.com/users/sjmcculloch/repos","events_url":"https://api.github.com/users/sjmcculloch/events{/privacy}","received_events_url":"https://api.github.com/users/sjmcculloch/received_events","type":"User","site_admin":false},"body":"- Added mutations  and enhancements to client screens for:\r\n\r\n-- addTimeSegment\r\n-- removeTimeSegment\r\n-- updateTimeSegment\r\n\r\n- Removed availability state for items (only UI interaction settings will be kept in redux).\r\n\r\n- Removed hardcoded fixture data\r\n\r\n![image](https://user-images.githubusercontent.com/19988272/35804069-480f13ea-0aca-11e8-9ca5-2b44dce51324.png)\r\n\r\n- Sorting & validation still to come\r\n\r\n![image](https://user-images.githubusercontent.com/19988272/35804099-6725ab68-0aca-11e8-8cf3-fd507c3c56bb.png)\r\n\r\n","created_at":"2018-02-05T12:15:30Z","updated_at":"2018-02-05T22:26:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8bf0ec2cebcddcab306fb6a761bb6df77c9d9d84","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"milestone":null,"commits_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/174/commits","review_comments_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/174/comments","review_comment_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues/174/comments","statuses_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/statuses/5da610722a967068d1bb4d8db973c66340ac5dab","head":{"label":"NSWSESMembers:smcculloch.graphql-availability","ref":"smcculloch.graphql-availability","sha":"5da610722a967068d1bb4d8db973c66340ac5dab","user":{"login":"NSWSESMembers","id":17103376,"avatar_url":"https://avatars0.githubusercontent.com/u/17103376?v=4","gravatar_id":"","url":"https://api.github.com/users/NSWSESMembers","html_url":"https://github.com/NSWSESMembers","followers_url":"https://api.github.com/users/NSWSESMembers/followers","following_url":"https://api.github.com/users/NSWSESMembers/following{/other_user}","gists_url":"https://api.github.com/users/NSWSESMembers/gists{/gist_id}","starred_url":"https://api.github.com/users/NSWSESMembers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSWSESMembers/subscriptions","organizations_url":"https://api.github.com/users/NSWSESMembers/orgs","repos_url":"https://api.github.com/users/NSWSESMembers/repos","events_url":"https://api.github.com/users/NSWSESMembers/events{/privacy}","received_events_url":"https://api.github.com/users/NSWSESMembers/received_events","type":"Organization","site_admin":false},"repo":{"id":109944281,"name":"availability-poc","full_name":"NSWSESMembers/availability-poc","owner":{"login":"NSWSESMembers","id":17103376,"avatar_url":"https://avatars0.githubusercontent.com/u/17103376?v=4","gravatar_id":"","url":"https://api.github.com/users/NSWSESMembers","html_url":"https://github.com/NSWSESMembers","followers_url":"https://api.github.com/users/NSWSESMembers/followers","following_url":"https://api.github.com/users/NSWSESMembers/following{/other_user}","gists_url":"https://api.github.com/users/NSWSESMembers/gists{/gist_id}","starred_url":"https://api.github.com/users/NSWSESMembers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSWSESMembers/subscriptions","organizations_url":"https://api.github.com/users/NSWSESMembers/orgs","repos_url":"https://api.github.com/users/NSWSESMembers/repos","events_url":"https://api.github.com/users/NSWSESMembers/events{/privacy}","received_events_url":"https://api.github.com/users/NSWSESMembers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NSWSESMembers/availability-poc","description":"WIP proof of concept availability app","fork":false,"url":"https://api.github.com/repos/NSWSESMembers/availability-poc","forks_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/forks","keys_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/teams","hooks_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/hooks","issue_events_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues/events{/number}","events_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/events","assignees_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/assignees{/user}","branches_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/branches{/branch}","tags_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/tags","blobs_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/languages","stargazers_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/stargazers","contributors_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/contributors","subscribers_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/subscribers","subscription_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/subscription","commits_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/contents/{+path}","compare_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/merges","archive_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/downloads","issues_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues{/number}","pulls_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/labels{/name}","releases_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/releases{/id}","deployments_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/deployments","created_at":"2017-11-08T07:49:00Z","updated_at":"2017-12-14T01:35:43Z","pushed_at":"2018-02-05T22:02:01Z","git_url":"git://github.com/NSWSESMembers/availability-poc.git","ssh_url":"git@github.com:NSWSESMembers/availability-poc.git","clone_url":"https://github.com/NSWSESMembers/availability-poc.git","svn_url":"https://github.com/NSWSESMembers/availability-poc","homepage":null,"size":1503,"stargazers_count":5,"watchers_count":5,"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":36,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":36,"watchers":5,"default_branch":"master"}},"base":{"label":"NSWSESMembers:master","ref":"master","sha":"bfa3327e64c90e031fcc4d09c46e648f68ca14a6","user":{"login":"NSWSESMembers","id":17103376,"avatar_url":"https://avatars0.githubusercontent.com/u/17103376?v=4","gravatar_id":"","url":"https://api.github.com/users/NSWSESMembers","html_url":"https://github.com/NSWSESMembers","followers_url":"https://api.github.com/users/NSWSESMembers/followers","following_url":"https://api.github.com/users/NSWSESMembers/following{/other_user}","gists_url":"https://api.github.com/users/NSWSESMembers/gists{/gist_id}","starred_url":"https://api.github.com/users/NSWSESMembers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSWSESMembers/subscriptions","organizations_url":"https://api.github.com/users/NSWSESMembers/orgs","repos_url":"https://api.github.com/users/NSWSESMembers/repos","events_url":"https://api.github.com/users/NSWSESMembers/events{/privacy}","received_events_url":"https://api.github.com/users/NSWSESMembers/received_events","type":"Organization","site_admin":false},"repo":{"id":109944281,"name":"availability-poc","full_name":"NSWSESMembers/availability-poc","owner":{"login":"NSWSESMembers","id":17103376,"avatar_url":"https://avatars0.githubusercontent.com/u/17103376?v=4","gravatar_id":"","url":"https://api.github.com/users/NSWSESMembers","html_url":"https://github.com/NSWSESMembers","followers_url":"https://api.github.com/users/NSWSESMembers/followers","following_url":"https://api.github.com/users/NSWSESMembers/following{/other_user}","gists_url":"https://api.github.com/users/NSWSESMembers/gists{/gist_id}","starred_url":"https://api.github.com/users/NSWSESMembers/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NSWSESMembers/subscriptions","organizations_url":"https://api.github.com/users/NSWSESMembers/orgs","repos_url":"https://api.github.com/users/NSWSESMembers/repos","events_url":"https://api.github.com/users/NSWSESMembers/events{/privacy}","received_events_url":"https://api.github.com/users/NSWSESMembers/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/NSWSESMembers/availability-poc","description":"WIP proof of concept availability app","fork":false,"url":"https://api.github.com/repos/NSWSESMembers/availability-poc","forks_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/forks","keys_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/teams","hooks_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/hooks","issue_events_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues/events{/number}","events_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/events","assignees_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/assignees{/user}","branches_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/branches{/branch}","tags_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/tags","blobs_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/refs{/sha}","trees_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/statuses/{sha}","languages_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/languages","stargazers_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/stargazers","contributors_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/contributors","subscribers_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/subscribers","subscription_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/subscription","commits_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/commits{/sha}","git_commits_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/git/commits{/sha}","comments_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/comments{/number}","issue_comment_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues/comments{/number}","contents_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/contents/{+path}","compare_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/merges","archive_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/downloads","issues_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues{/number}","pulls_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls{/number}","milestones_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/milestones{/number}","notifications_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/labels{/name}","releases_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/releases{/id}","deployments_url":"https://api.github.com/repos/NSWSESMembers/availability-poc/deployments","created_at":"2017-11-08T07:49:00Z","updated_at":"2017-12-14T01:35:43Z","pushed_at":"2018-02-05T22:02:01Z","git_url":"git://github.com/NSWSESMembers/availability-poc.git","ssh_url":"git@github.com:NSWSESMembers/availability-poc.git","clone_url":"https://github.com/NSWSESMembers/availability-poc.git","svn_url":"https://github.com/NSWSESMembers/availability-poc","homepage":null,"size":1503,"stargazers_count":5,"watchers_count":5,"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":36,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":3,"open_issues":36,"watchers":5,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/174"},"html":{"href":"https://github.com/NSWSESMembers/availability-poc/pull/174"},"issue":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues/174"},"comments":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/issues/174/comments"},"review_comments":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/174/comments"},"review_comment":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/pulls/174/commits"},"statuses":{"href":"https://api.github.com/repos/NSWSESMembers/availability-poc/statuses/5da610722a967068d1bb4d8db973c66340ac5dab"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"sjmcculloch"}}