{"action":"created","comment":{"url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/comments/118083975","pull_request_review_id":39843882,"id":118083975,"diff_hunk":"@@ -0,0 +1,187 @@\n+import React from 'react';\n+import PropTypes from 'prop-types';\n+import { connect } from 'react-redux';\n+import * as DocumentAction from '../../actions/documentAction';\n+import CardDocumentView from '../common/CardDocumentView.jsx';\n+import PaginationNav from '../common/PaginationNav.jsx';\n+\n+class Dashboard extends React.Component {\n+  constructor(props) {\n+    super(props);\n+\n+    this.state = {\n+      AuthToViewDocuments: props.documents.AuthToViewDocuments,\n+      selected: 1,\n+      page: 1,\n+      isPageLoad: false,\n+      search: ' ',\n+    };\n+    this.handlePagination = this.handlePagination.bind(this);\n+    this.onChange = this.onChange.bind(this);\n+    this.onSubmit = this.onSubmit.bind(this);\n+  }\n+  componentWillMount() {\n+    this.props.loadAuthorizedToViewDocument();\n+  }\n+  componentWillReceiveProps(nextProps) {\n+    this.setState({ AuthToViewDocuments: nextProps.documents.AuthorizeToViewDocuments });\n+    if (this.props !== nextProps.props) {\n+      const { isPageLoad } = this.state;\n+      const { AuthorizeToViewDocuments } = nextProps.documents;\n+      if (!isPageLoad) {\n+        if (AuthorizeToViewDocuments) {\n+          const page = Math.ceil(AuthorizeToViewDocuments.length / 5);\n+          this.props.loadAuthorizedToViewDocument(5, 0);\n+          this.setState({ page });\n+          this.setState({ isPageLoad: true });\n+        }\n+      }\n+    }\n+  }\n+  handlePagination(limit, offset, event) {\n+    this.props.loadAuthorizedToViewDocument(limit, offset);\n+    this.setState({ selected: event.target.innerHTML });\n+  }\n+  onChange(event) {\n+    event.preventDefault();\n+    if (event.target.value === '' ||\n+        event.target.value === '  ' ||\n+        event.target.value === ' ') {\n+      this.props.loadAuthorizedToViewDocument(5, 0);\n+    }\n+    this.setState({ search: event.target.value });\n+  }\n+  onSubmit(event) {\n+    event.preventDefault();\n+    this.props.searchDocumentsByTitleOnDashboard(this.state.search, 5, 0);\n+  }\n+  render() {\n+    const { AuthToViewDocuments } = this.state;\n+    const publicDocuments = [];\n+    const roleDocuments = [];\n+    if (AuthToViewDocuments) {\n+      AuthToViewDocuments.map((document) => {\n+        if (document.access === 'public') {\n+          publicDocuments.push(document);\n+        } else if (document.access === 'role') {\n+          roleDocuments.push(document);\n+        }\n+      });\n+    }\n+    const { selected, page, search } = this.state;\n+    const selectedDocuments = selected.toString();\n+    const isActive = 'active';\n+    const notActive = 'waves-effect';\n+    let pageArray;\n+    if (page) {\n+      pageArray = new Array(page).fill('pages');\n+    }\n+    return (\n+      <div className=\"container\">\n+        <br />\n+        <div className=\"row\">\n+          <div className=\"col s12\">\n+            <ul className=\"tabs\">\n+              <li className=\"tab col s6\"><a href=\"#test1\">Public Documents</a></li>","path":"client/components/Dashboard/Dashboard.jsx","position":85,"original_position":85,"commit_id":"811f10d28e3ba688c228ccf94ef716ec8be8a31d","original_commit_id":"811f10d28e3ba688c228ccf94ef716ec8be8a31d","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars3.githubusercontent.com/u/6697940?v=3","gravatar_id":"","url":"https://api.github.com/users/houndci-bot","html_url":"https://github.com/houndci-bot","followers_url":"https://api.github.com/users/houndci-bot/followers","following_url":"https://api.github.com/users/houndci-bot/following{/other_user}","gists_url":"https://api.github.com/users/houndci-bot/gists{/gist_id}","starred_url":"https://api.github.com/users/houndci-bot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/houndci-bot/subscriptions","organizations_url":"https://api.github.com/users/houndci-bot/orgs","repos_url":"https://api.github.com/users/houndci-bot/repos","events_url":"https://api.github.com/users/houndci-bot/events{/privacy}","received_events_url":"https://api.github.com/users/houndci-bot/received_events","type":"User","site_admin":false},"body":"Line 85 exceeds the maximum line length of 80   max-len","created_at":"2017-05-23T19:27:25Z","updated_at":"2017-05-23T19:27:25Z","html_url":"https://github.com/andela-jomadoye/JedDoc-Manager/pull/9#discussion_r118083975","pull_request_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/9","_links":{"self":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/comments/118083975"},"html":{"href":"https://github.com/andela-jomadoye/JedDoc-Manager/pull/9#discussion_r118083975"},"pull_request":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/9"}}},"pull_request":{"url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/9","id":119370960,"html_url":"https://github.com/andela-jomadoye/JedDoc-Manager/pull/9","diff_url":"https://github.com/andela-jomadoye/JedDoc-Manager/pull/9.diff","patch_url":"https://github.com/andela-jomadoye/JedDoc-Manager/pull/9.patch","issue_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues/9","number":9,"state":"open","locked":false,"title":"Test Client-side PR","user":{"login":"andela-jomadoye","id":26272732,"avatar_url":"https://avatars2.githubusercontent.com/u/26272732?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jomadoye","html_url":"https://github.com/andela-jomadoye","followers_url":"https://api.github.com/users/andela-jomadoye/followers","following_url":"https://api.github.com/users/andela-jomadoye/following{/other_user}","gists_url":"https://api.github.com/users/andela-jomadoye/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jomadoye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jomadoye/subscriptions","organizations_url":"https://api.github.com/users/andela-jomadoye/orgs","repos_url":"https://api.github.com/users/andela-jomadoye/repos","events_url":"https://api.github.com/users/andela-jomadoye/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jomadoye/received_events","type":"User","site_admin":false},"body":"","created_at":"2017-05-08T03:20:45Z","updated_at":"2017-05-23T19:27:26Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5966fe36c1750b1ea180076dfe1d33a6a2996362","assignee":null,"assignees":[],"requested_reviewers":[],"milestone":null,"commits_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/9/commits","review_comments_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/9/comments","review_comment_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues/9/comments","statuses_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/statuses/811f10d28e3ba688c228ccf94ef716ec8be8a31d","head":{"label":"andela-jomadoye:feature/143585203/build-frontend-components-with-effective-UI/UX","ref":"feature/143585203/build-frontend-components-with-effective-UI/UX","sha":"811f10d28e3ba688c228ccf94ef716ec8be8a31d","user":{"login":"andela-jomadoye","id":26272732,"avatar_url":"https://avatars2.githubusercontent.com/u/26272732?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jomadoye","html_url":"https://github.com/andela-jomadoye","followers_url":"https://api.github.com/users/andela-jomadoye/followers","following_url":"https://api.github.com/users/andela-jomadoye/following{/other_user}","gists_url":"https://api.github.com/users/andela-jomadoye/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jomadoye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jomadoye/subscriptions","organizations_url":"https://api.github.com/users/andela-jomadoye/orgs","repos_url":"https://api.github.com/users/andela-jomadoye/repos","events_url":"https://api.github.com/users/andela-jomadoye/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jomadoye/received_events","type":"User","site_admin":false},"repo":{"id":88060159,"name":"JedDoc-Manager","full_name":"andela-jomadoye/JedDoc-Manager","owner":{"login":"andela-jomadoye","id":26272732,"avatar_url":"https://avatars2.githubusercontent.com/u/26272732?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jomadoye","html_url":"https://github.com/andela-jomadoye","followers_url":"https://api.github.com/users/andela-jomadoye/followers","following_url":"https://api.github.com/users/andela-jomadoye/following{/other_user}","gists_url":"https://api.github.com/users/andela-jomadoye/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jomadoye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jomadoye/subscriptions","organizations_url":"https://api.github.com/users/andela-jomadoye/orgs","repos_url":"https://api.github.com/users/andela-jomadoye/repos","events_url":"https://api.github.com/users/andela-jomadoye/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jomadoye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-jomadoye/JedDoc-Manager","description":"Jed Document Management System","fork":false,"url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager","forks_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/forks","keys_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/teams","hooks_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/hooks","issue_events_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues/events{/number}","events_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/events","assignees_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/assignees{/user}","branches_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/branches{/branch}","tags_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/tags","blobs_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/languages","stargazers_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/stargazers","contributors_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/contributors","subscribers_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/subscribers","subscription_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/subscription","commits_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/contents/{+path}","compare_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/merges","archive_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/downloads","issues_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues{/number}","pulls_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/labels{/name}","releases_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/releases{/id}","deployments_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/deployments","created_at":"2017-04-12T14:18:19Z","updated_at":"2017-04-29T08:13:36Z","pushed_at":"2017-05-23T19:26:20Z","git_url":"git://github.com/andela-jomadoye/JedDoc-Manager.git","ssh_url":"git@github.com:andela-jomadoye/JedDoc-Manager.git","clone_url":"https://github.com/andela-jomadoye/JedDoc-Manager.git","svn_url":"https://github.com/andela-jomadoye/JedDoc-Manager","homepage":null,"size":643,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":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":"develop"}},"base":{"label":"andela-jomadoye:master","ref":"master","sha":"676ed06dc93f86eafe3b1967f03ab75b16a790b5","user":{"login":"andela-jomadoye","id":26272732,"avatar_url":"https://avatars2.githubusercontent.com/u/26272732?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jomadoye","html_url":"https://github.com/andela-jomadoye","followers_url":"https://api.github.com/users/andela-jomadoye/followers","following_url":"https://api.github.com/users/andela-jomadoye/following{/other_user}","gists_url":"https://api.github.com/users/andela-jomadoye/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jomadoye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jomadoye/subscriptions","organizations_url":"https://api.github.com/users/andela-jomadoye/orgs","repos_url":"https://api.github.com/users/andela-jomadoye/repos","events_url":"https://api.github.com/users/andela-jomadoye/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jomadoye/received_events","type":"User","site_admin":false},"repo":{"id":88060159,"name":"JedDoc-Manager","full_name":"andela-jomadoye/JedDoc-Manager","owner":{"login":"andela-jomadoye","id":26272732,"avatar_url":"https://avatars2.githubusercontent.com/u/26272732?v=3","gravatar_id":"","url":"https://api.github.com/users/andela-jomadoye","html_url":"https://github.com/andela-jomadoye","followers_url":"https://api.github.com/users/andela-jomadoye/followers","following_url":"https://api.github.com/users/andela-jomadoye/following{/other_user}","gists_url":"https://api.github.com/users/andela-jomadoye/gists{/gist_id}","starred_url":"https://api.github.com/users/andela-jomadoye/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela-jomadoye/subscriptions","organizations_url":"https://api.github.com/users/andela-jomadoye/orgs","repos_url":"https://api.github.com/users/andela-jomadoye/repos","events_url":"https://api.github.com/users/andela-jomadoye/events{/privacy}","received_events_url":"https://api.github.com/users/andela-jomadoye/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/andela-jomadoye/JedDoc-Manager","description":"Jed Document Management System","fork":false,"url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager","forks_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/forks","keys_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/teams","hooks_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/hooks","issue_events_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues/events{/number}","events_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/events","assignees_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/assignees{/user}","branches_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/branches{/branch}","tags_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/tags","blobs_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/statuses/{sha}","languages_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/languages","stargazers_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/stargazers","contributors_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/contributors","subscribers_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/subscribers","subscription_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/subscription","commits_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/contents/{+path}","compare_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/merges","archive_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/downloads","issues_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues{/number}","pulls_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls{/number}","milestones_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/milestones{/number}","notifications_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/labels{/name}","releases_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/releases{/id}","deployments_url":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/deployments","created_at":"2017-04-12T14:18:19Z","updated_at":"2017-04-29T08:13:36Z","pushed_at":"2017-05-23T19:26:20Z","git_url":"git://github.com/andela-jomadoye/JedDoc-Manager.git","ssh_url":"git@github.com:andela-jomadoye/JedDoc-Manager.git","clone_url":"https://github.com/andela-jomadoye/JedDoc-Manager.git","svn_url":"https://github.com/andela-jomadoye/JedDoc-Manager","homepage":null,"size":643,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":true,"has_projects":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":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/9"},"html":{"href":"https://github.com/andela-jomadoye/JedDoc-Manager/pull/9"},"issue":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues/9"},"comments":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/issues/9/comments"},"review_comments":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/9/comments"},"review_comment":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/pulls/9/commits"},"statuses":{"href":"https://api.github.com/repos/andela-jomadoye/JedDoc-Manager/statuses/811f10d28e3ba688c228ccf94ef716ec8be8a31d"}}}}
{"actor":{"display_login":"houndci-bot"}}