{"action":"created","comment":{"url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/comments/179967059","pull_request_review_id":110306032,"id":179967059,"diff_hunk":"@@ -0,0 +1,65 @@\n+import React, { Component } from 'react';\n+\n+class AdminBorrowReq extends Component {\n+    constructor(props) {\n+        super(props);\n+        this.acceptBorrowRequest = this.acceptBorrowRequest.bind(this);\n+        //this.declineBorrowRequest = this.declineBorrowRequest.bind(this);\n+    }\n+\n+    acceptBorrowRequest(userId, bookId, requestIndex) {\n+        const { handleBorrowRequest } = this.props;\n+        handleBorrowRequest({ status: 'Accepted' }, userId, bookId, requestIndex);\n+    }\n+\n+    render() {\n+        const { borrowRequests, isHandlingBorrowRequest } = this.props;\n+        if (!borrowRequests.length) {\n+            return (\n+                <div className=\"row center\">\n+                    <p className=\"grey-text\">You have no borrow requests </p>\n+                </div>\n+            );\n+        }\n+    \n+        return (\n+            <div className=\"row\">\n+                <table class=\"striped responsive-table\">\n+                    <thead>\n+                        <tr>\n+                            <th>User</th>\n+                            <th>Book Title</th>\n+                            <th>Reason</th>\n+                            <th>Return Date</th>\n+                            <th>Comments</th>\n+                            <th>Request Date</th>\n+                            <th>status</th>\n+                            <th colSpan=\"2\">Action</th>\n+                        </tr>\n+                    </thead>\n+                    <tbody>\n+                        { borrowRequests.map((request, index) =>\n+                            <tr key={ index }>\n+                                <td> { `${request.userBorrowRequests.firstName} ${request.userBorrowRequests.lastName}` } </td>\n+                                <td> { request.borrowRequests.title } </td>\n+                                <td> { request.reason } </td>\n+                                <td> { request.returnDate } </td>\n+                                <td> { request.comments || 'Nil' } </td>\n+                                <td> { request.createdAt.split('T')[0] } </td>\n+                                <td> { request.status } </td>\n+                                <td> <button className=\"btn btn-wave waves-effect btn-small red\"\n+                                disabled = { request.status !== 'Pending' || isHandlingBorrowRequest } ","path":"client/components/AdminBorrowReq.js","position":51,"original_position":51,"commit_id":"b04b0680d5595403070330a2abb5a3b81d8119d3","original_commit_id":"b04b0680d5595403070330a2abb5a3b81d8119d3","user":{"login":"houndci-bot","id":6697940,"avatar_url":"https://avatars0.githubusercontent.com/u/6697940?v=4","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":"Trailing spaces not allowed                                   no-trailing-spaces","created_at":"2018-04-09T00:04:35Z","updated_at":"2018-04-09T00:04:36Z","html_url":"https://github.com/amarachukwu-agbo/hello-books/pull/49#discussion_r179967059","pull_request_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/49","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/comments/179967059"},"html":{"href":"https://github.com/amarachukwu-agbo/hello-books/pull/49#discussion_r179967059"},"pull_request":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/49"}}},"pull_request":{"url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/49","id":180181027,"html_url":"https://github.com/amarachukwu-agbo/hello-books/pull/49","diff_url":"https://github.com/amarachukwu-agbo/hello-books/pull/49.diff","patch_url":"https://github.com/amarachukwu-agbo/hello-books/pull/49.patch","issue_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues/49","number":49,"state":"open","locked":false,"title":"Ft view borrow requests","user":{"login":"amarachukwu-agbo","id":25195857,"avatar_url":"https://avatars0.githubusercontent.com/u/25195857?v=4","gravatar_id":"","url":"https://api.github.com/users/amarachukwu-agbo","html_url":"https://github.com/amarachukwu-agbo","followers_url":"https://api.github.com/users/amarachukwu-agbo/followers","following_url":"https://api.github.com/users/amarachukwu-agbo/following{/other_user}","gists_url":"https://api.github.com/users/amarachukwu-agbo/gists{/gist_id}","starred_url":"https://api.github.com/users/amarachukwu-agbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarachukwu-agbo/subscriptions","organizations_url":"https://api.github.com/users/amarachukwu-agbo/orgs","repos_url":"https://api.github.com/users/amarachukwu-agbo/repos","events_url":"https://api.github.com/users/amarachukwu-agbo/events{/privacy}","received_events_url":"https://api.github.com/users/amarachukwu-agbo/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-04-08T21:19:04Z","updated_at":"2018-04-09T00:04:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"13e053418b4f3c1cbb2e396fbb253657dfed3607","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/49/commits","review_comments_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/49/comments","review_comment_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/comments{/number}","comments_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues/49/comments","statuses_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/statuses/b04b0680d5595403070330a2abb5a3b81d8119d3","head":{"label":"amarachukwu-agbo:ft-view_borrow_requests","ref":"ft-view_borrow_requests","sha":"b04b0680d5595403070330a2abb5a3b81d8119d3","user":{"login":"amarachukwu-agbo","id":25195857,"avatar_url":"https://avatars0.githubusercontent.com/u/25195857?v=4","gravatar_id":"","url":"https://api.github.com/users/amarachukwu-agbo","html_url":"https://github.com/amarachukwu-agbo","followers_url":"https://api.github.com/users/amarachukwu-agbo/followers","following_url":"https://api.github.com/users/amarachukwu-agbo/following{/other_user}","gists_url":"https://api.github.com/users/amarachukwu-agbo/gists{/gist_id}","starred_url":"https://api.github.com/users/amarachukwu-agbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarachukwu-agbo/subscriptions","organizations_url":"https://api.github.com/users/amarachukwu-agbo/orgs","repos_url":"https://api.github.com/users/amarachukwu-agbo/repos","events_url":"https://api.github.com/users/amarachukwu-agbo/events{/privacy}","received_events_url":"https://api.github.com/users/amarachukwu-agbo/received_events","type":"User","site_admin":false},"repo":{"id":105970890,"name":"hello-books","full_name":"amarachukwu-agbo/hello-books","owner":{"login":"amarachukwu-agbo","id":25195857,"avatar_url":"https://avatars0.githubusercontent.com/u/25195857?v=4","gravatar_id":"","url":"https://api.github.com/users/amarachukwu-agbo","html_url":"https://github.com/amarachukwu-agbo","followers_url":"https://api.github.com/users/amarachukwu-agbo/followers","following_url":"https://api.github.com/users/amarachukwu-agbo/following{/other_user}","gists_url":"https://api.github.com/users/amarachukwu-agbo/gists{/gist_id}","starred_url":"https://api.github.com/users/amarachukwu-agbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarachukwu-agbo/subscriptions","organizations_url":"https://api.github.com/users/amarachukwu-agbo/orgs","repos_url":"https://api.github.com/users/amarachukwu-agbo/repos","events_url":"https://api.github.com/users/amarachukwu-agbo/events{/privacy}","received_events_url":"https://api.github.com/users/amarachukwu-agbo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amarachukwu-agbo/hello-books","description":"Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books. With this application users are able to find and rent books. The application also has an admin section where the admin can do things like add books, delete books, increase the quantity of a book etc.","fork":false,"url":"https://api.github.com/repos/amarachukwu-agbo/hello-books","forks_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/forks","keys_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/teams","hooks_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/hooks","issue_events_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues/events{/number}","events_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/events","assignees_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/assignees{/user}","branches_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/branches{/branch}","tags_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/tags","blobs_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/refs{/sha}","trees_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/statuses/{sha}","languages_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/languages","stargazers_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/stargazers","contributors_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/contributors","subscribers_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/subscribers","subscription_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/subscription","commits_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/commits{/sha}","git_commits_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/commits{/sha}","comments_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/comments{/number}","issue_comment_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues/comments{/number}","contents_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/contents/{+path}","compare_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/merges","archive_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/downloads","issues_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues{/number}","pulls_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls{/number}","milestones_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/milestones{/number}","notifications_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/labels{/name}","releases_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/releases{/id}","deployments_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/deployments","created_at":"2017-10-06T05:38:27Z","updated_at":"2018-04-06T16:51:13Z","pushed_at":"2018-04-09T00:04:13Z","git_url":"git://github.com/amarachukwu-agbo/hello-books.git","ssh_url":"git@github.com:amarachukwu-agbo/hello-books.git","clone_url":"https://github.com/amarachukwu-agbo/hello-books.git","svn_url":"https://github.com/amarachukwu-agbo/hello-books","homepage":null,"size":923,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"base":{"label":"amarachukwu-agbo:develop","ref":"develop","sha":"1b6eadcf9b8b2c5aa017db7641b7081724e7b6c0","user":{"login":"amarachukwu-agbo","id":25195857,"avatar_url":"https://avatars0.githubusercontent.com/u/25195857?v=4","gravatar_id":"","url":"https://api.github.com/users/amarachukwu-agbo","html_url":"https://github.com/amarachukwu-agbo","followers_url":"https://api.github.com/users/amarachukwu-agbo/followers","following_url":"https://api.github.com/users/amarachukwu-agbo/following{/other_user}","gists_url":"https://api.github.com/users/amarachukwu-agbo/gists{/gist_id}","starred_url":"https://api.github.com/users/amarachukwu-agbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarachukwu-agbo/subscriptions","organizations_url":"https://api.github.com/users/amarachukwu-agbo/orgs","repos_url":"https://api.github.com/users/amarachukwu-agbo/repos","events_url":"https://api.github.com/users/amarachukwu-agbo/events{/privacy}","received_events_url":"https://api.github.com/users/amarachukwu-agbo/received_events","type":"User","site_admin":false},"repo":{"id":105970890,"name":"hello-books","full_name":"amarachukwu-agbo/hello-books","owner":{"login":"amarachukwu-agbo","id":25195857,"avatar_url":"https://avatars0.githubusercontent.com/u/25195857?v=4","gravatar_id":"","url":"https://api.github.com/users/amarachukwu-agbo","html_url":"https://github.com/amarachukwu-agbo","followers_url":"https://api.github.com/users/amarachukwu-agbo/followers","following_url":"https://api.github.com/users/amarachukwu-agbo/following{/other_user}","gists_url":"https://api.github.com/users/amarachukwu-agbo/gists{/gist_id}","starred_url":"https://api.github.com/users/amarachukwu-agbo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/amarachukwu-agbo/subscriptions","organizations_url":"https://api.github.com/users/amarachukwu-agbo/orgs","repos_url":"https://api.github.com/users/amarachukwu-agbo/repos","events_url":"https://api.github.com/users/amarachukwu-agbo/events{/privacy}","received_events_url":"https://api.github.com/users/amarachukwu-agbo/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/amarachukwu-agbo/hello-books","description":"Hello-Books is a simple application that helps manage a library and its processes like stocking, tracking and renting books. With this application users are able to find and rent books. The application also has an admin section where the admin can do things like add books, delete books, increase the quantity of a book etc.","fork":false,"url":"https://api.github.com/repos/amarachukwu-agbo/hello-books","forks_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/forks","keys_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/keys{/key_id}","collaborators_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/teams","hooks_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/hooks","issue_events_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues/events{/number}","events_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/events","assignees_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/assignees{/user}","branches_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/branches{/branch}","tags_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/tags","blobs_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/refs{/sha}","trees_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/trees{/sha}","statuses_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/statuses/{sha}","languages_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/languages","stargazers_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/stargazers","contributors_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/contributors","subscribers_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/subscribers","subscription_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/subscription","commits_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/commits{/sha}","git_commits_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/git/commits{/sha}","comments_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/comments{/number}","issue_comment_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues/comments{/number}","contents_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/contents/{+path}","compare_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/compare/{base}...{head}","merges_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/merges","archive_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/downloads","issues_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues{/number}","pulls_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls{/number}","milestones_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/milestones{/number}","notifications_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/labels{/name}","releases_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/releases{/id}","deployments_url":"https://api.github.com/repos/amarachukwu-agbo/hello-books/deployments","created_at":"2017-10-06T05:38:27Z","updated_at":"2018-04-06T16:51:13Z","pushed_at":"2018-04-09T00:04:13Z","git_url":"git://github.com/amarachukwu-agbo/hello-books.git","ssh_url":"git@github.com:amarachukwu-agbo/hello-books.git","clone_url":"https://github.com/amarachukwu-agbo/hello-books.git","svn_url":"https://github.com/amarachukwu-agbo/hello-books","homepage":null,"size":923,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":1,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit"},"forks":0,"open_issues":1,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/49"},"html":{"href":"https://github.com/amarachukwu-agbo/hello-books/pull/49"},"issue":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues/49"},"comments":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/issues/49/comments"},"review_comments":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/49/comments"},"review_comment":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/pulls/49/commits"},"statuses":{"href":"https://api.github.com/repos/amarachukwu-agbo/hello-books/statuses/b04b0680d5595403070330a2abb5a3b81d8119d3"}},"author_association":"OWNER"}}
{"actor":{"display_login":"houndci-bot"}}