{"action":"created","comment":{"url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/comments/83733630","pull_request_review_id":4558170,"id":83733630,"diff_hunk":"@@ -0,0 +1,76 @@\n+import React from 'react';\n+import {connect} from 'react-redux';\n+\n+import {getOrderForAdministration, foodOrdered} from '../store/ordersActions';\n+import OrderDetails from './orderDetails';\n+import Chat from './chat';\n+import OrderState from '../enums/orderState';\n+import messageBuilderFactory from './messageBuilderFactory';\n+\n+const AdministerOrder = React.createClass({\n+    propTypes: {\n+        dispatch: React.PropTypes.func.isRequired,\n+        order: React.PropTypes.object.isRequired,\n+        params: React.PropTypes.object.isRequired\n+    },\n+\n+    componentDidMount () {\n+        this.props.dispatch(getOrderForAdministration(this.props.params.adminId));\n+    },\n+\n+    renderActions () {\n+        const {state: orderState} = this.props.order;\n+\n+        switch (orderState) {\n+        case (OrderState.Open):\n+            return (\n+                <button\n+                    className=\"btn btn-primary\"\n+                    onClick={() => this.props.dispatch(foodOrdered(this.props.params.adminId))}\n+                >Food ordered</button>\n+            );\n+        default:\n+            return null;\n+        }\n+    },\n+\n+    render () {\n+        const {order} = this.props;\n+\n+        const orderReady = () => order.id;","path":"src/components/administerOrder.jsx","position":40,"original_position":40,"commit_id":"73a61a7591ac5d4c0a2fd84fd6b452ce51c6c887","original_commit_id":"73a61a7591ac5d4c0a2fd84fd6b452ce51c6c887","user":{"login":"kjendrzyca","id":7491025,"avatar_url":"https://avatars.githubusercontent.com/u/7491025?v=3","gravatar_id":"","url":"https://api.github.com/users/kjendrzyca","html_url":"https://github.com/kjendrzyca","followers_url":"https://api.github.com/users/kjendrzyca/followers","following_url":"https://api.github.com/users/kjendrzyca/following{/other_user}","gists_url":"https://api.github.com/users/kjendrzyca/gists{/gist_id}","starred_url":"https://api.github.com/users/kjendrzyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjendrzyca/subscriptions","organizations_url":"https://api.github.com/users/kjendrzyca/orgs","repos_url":"https://api.github.com/users/kjendrzyca/repos","events_url":"https://api.github.com/users/kjendrzyca/events{/privacy}","received_events_url":"https://api.github.com/users/kjendrzyca/received_events","type":"User","site_admin":false},"body":"additionally, I would change the name to `orderLoaded`","created_at":"2016-10-17T21:03:58Z","updated_at":"2016-10-17T21:03:58Z","html_url":"https://github.com/kjendrzyca/corpo-food/pull/41#discussion_r83733630","pull_request_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41","_links":{"self":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/comments/83733630"},"html":{"href":"https://github.com/kjendrzyca/corpo-food/pull/41#discussion_r83733630"},"pull_request":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41"}}},"pull_request":{"url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41","id":88892830,"html_url":"https://github.com/kjendrzyca/corpo-food/pull/41","diff_url":"https://github.com/kjendrzyca/corpo-food/pull/41.diff","patch_url":"https://github.com/kjendrzyca/corpo-food/pull/41.patch","issue_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/41","number":41,"state":"open","locked":false,"title":"Order administration (idea?)","user":{"login":"tarnas14","id":9142942,"avatar_url":"https://avatars.githubusercontent.com/u/9142942?v=3","gravatar_id":"","url":"https://api.github.com/users/tarnas14","html_url":"https://github.com/tarnas14","followers_url":"https://api.github.com/users/tarnas14/followers","following_url":"https://api.github.com/users/tarnas14/following{/other_user}","gists_url":"https://api.github.com/users/tarnas14/gists{/gist_id}","starred_url":"https://api.github.com/users/tarnas14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarnas14/subscriptions","organizations_url":"https://api.github.com/users/tarnas14/orgs","repos_url":"https://api.github.com/users/tarnas14/repos","events_url":"https://api.github.com/users/tarnas14/events{/privacy}","received_events_url":"https://api.github.com/users/tarnas14/received_events","type":"User","site_admin":false},"body":"Here's the idea:\r\n\r\nsharing the access to order administration would be too much of a hassle with Password protection, I think, because you have to put a password that's easy to remember so that you can share it with somebody else in case you are not available when the food arrives (think meetings, plannings, client calls etc.)\r\n\r\nso I thought we could have a special link to an order that would give you administrator's privileges - after creating an order we display that link for the user to store, so it's easy to share with somebody else on a short notice (or with a bunch of people, for that matter)\r\n\r\nwhat do you guys think of this flow?\r\n\r\nI haven't finished everything yet, there are still cosmetics to do: removing magic strings and putting them to resources, maybe figuring out the component composition? I'm open to suggestion and I advise to check out this branch and see the flow for yourself to judge if it's ok or not","created_at":"2016-10-11T19:13:32Z","updated_at":"2016-10-17T21:17:37Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ed4bb7644e19ed1365d4bd7546c784de09f234d6","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41/commits","review_comments_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41/comments","review_comment_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/comments{/number}","comments_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/41/comments","statuses_url":"https://api.github.com/repos/kjendrzyca/corpo-food/statuses/73a61a7591ac5d4c0a2fd84fd6b452ce51c6c887","head":{"label":"tarnas14:order-administration","ref":"order-administration","sha":"73a61a7591ac5d4c0a2fd84fd6b452ce51c6c887","user":{"login":"tarnas14","id":9142942,"avatar_url":"https://avatars.githubusercontent.com/u/9142942?v=3","gravatar_id":"","url":"https://api.github.com/users/tarnas14","html_url":"https://github.com/tarnas14","followers_url":"https://api.github.com/users/tarnas14/followers","following_url":"https://api.github.com/users/tarnas14/following{/other_user}","gists_url":"https://api.github.com/users/tarnas14/gists{/gist_id}","starred_url":"https://api.github.com/users/tarnas14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarnas14/subscriptions","organizations_url":"https://api.github.com/users/tarnas14/orgs","repos_url":"https://api.github.com/users/tarnas14/repos","events_url":"https://api.github.com/users/tarnas14/events{/privacy}","received_events_url":"https://api.github.com/users/tarnas14/received_events","type":"User","site_admin":false},"repo":{"id":54261734,"name":"corpo-food","full_name":"tarnas14/corpo-food","owner":{"login":"tarnas14","id":9142942,"avatar_url":"https://avatars.githubusercontent.com/u/9142942?v=3","gravatar_id":"","url":"https://api.github.com/users/tarnas14","html_url":"https://github.com/tarnas14","followers_url":"https://api.github.com/users/tarnas14/followers","following_url":"https://api.github.com/users/tarnas14/following{/other_user}","gists_url":"https://api.github.com/users/tarnas14/gists{/gist_id}","starred_url":"https://api.github.com/users/tarnas14/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tarnas14/subscriptions","organizations_url":"https://api.github.com/users/tarnas14/orgs","repos_url":"https://api.github.com/users/tarnas14/repos","events_url":"https://api.github.com/users/tarnas14/events{/privacy}","received_events_url":"https://api.github.com/users/tarnas14/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tarnas14/corpo-food","description":null,"fork":true,"url":"https://api.github.com/repos/tarnas14/corpo-food","forks_url":"https://api.github.com/repos/tarnas14/corpo-food/forks","keys_url":"https://api.github.com/repos/tarnas14/corpo-food/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tarnas14/corpo-food/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tarnas14/corpo-food/teams","hooks_url":"https://api.github.com/repos/tarnas14/corpo-food/hooks","issue_events_url":"https://api.github.com/repos/tarnas14/corpo-food/issues/events{/number}","events_url":"https://api.github.com/repos/tarnas14/corpo-food/events","assignees_url":"https://api.github.com/repos/tarnas14/corpo-food/assignees{/user}","branches_url":"https://api.github.com/repos/tarnas14/corpo-food/branches{/branch}","tags_url":"https://api.github.com/repos/tarnas14/corpo-food/tags","blobs_url":"https://api.github.com/repos/tarnas14/corpo-food/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tarnas14/corpo-food/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tarnas14/corpo-food/git/refs{/sha}","trees_url":"https://api.github.com/repos/tarnas14/corpo-food/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tarnas14/corpo-food/statuses/{sha}","languages_url":"https://api.github.com/repos/tarnas14/corpo-food/languages","stargazers_url":"https://api.github.com/repos/tarnas14/corpo-food/stargazers","contributors_url":"https://api.github.com/repos/tarnas14/corpo-food/contributors","subscribers_url":"https://api.github.com/repos/tarnas14/corpo-food/subscribers","subscription_url":"https://api.github.com/repos/tarnas14/corpo-food/subscription","commits_url":"https://api.github.com/repos/tarnas14/corpo-food/commits{/sha}","git_commits_url":"https://api.github.com/repos/tarnas14/corpo-food/git/commits{/sha}","comments_url":"https://api.github.com/repos/tarnas14/corpo-food/comments{/number}","issue_comment_url":"https://api.github.com/repos/tarnas14/corpo-food/issues/comments{/number}","contents_url":"https://api.github.com/repos/tarnas14/corpo-food/contents/{+path}","compare_url":"https://api.github.com/repos/tarnas14/corpo-food/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tarnas14/corpo-food/merges","archive_url":"https://api.github.com/repos/tarnas14/corpo-food/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tarnas14/corpo-food/downloads","issues_url":"https://api.github.com/repos/tarnas14/corpo-food/issues{/number}","pulls_url":"https://api.github.com/repos/tarnas14/corpo-food/pulls{/number}","milestones_url":"https://api.github.com/repos/tarnas14/corpo-food/milestones{/number}","notifications_url":"https://api.github.com/repos/tarnas14/corpo-food/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tarnas14/corpo-food/labels{/name}","releases_url":"https://api.github.com/repos/tarnas14/corpo-food/releases{/id}","deployments_url":"https://api.github.com/repos/tarnas14/corpo-food/deployments","created_at":"2016-03-19T11:10:55Z","updated_at":"2016-03-19T11:10:58Z","pushed_at":"2016-10-11T19:08:32Z","git_url":"git://github.com/tarnas14/corpo-food.git","ssh_url":"git@github.com:tarnas14/corpo-food.git","clone_url":"https://github.com/tarnas14/corpo-food.git","svn_url":"https://github.com/tarnas14/corpo-food","homepage":null,"size":503,"stargazers_count":0,"watchers_count":0,"language":"JavaScript","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"kjendrzyca:master","ref":"master","sha":"83b57c130b65aa074208dc8a932d61297da2607d","user":{"login":"kjendrzyca","id":7491025,"avatar_url":"https://avatars.githubusercontent.com/u/7491025?v=3","gravatar_id":"","url":"https://api.github.com/users/kjendrzyca","html_url":"https://github.com/kjendrzyca","followers_url":"https://api.github.com/users/kjendrzyca/followers","following_url":"https://api.github.com/users/kjendrzyca/following{/other_user}","gists_url":"https://api.github.com/users/kjendrzyca/gists{/gist_id}","starred_url":"https://api.github.com/users/kjendrzyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjendrzyca/subscriptions","organizations_url":"https://api.github.com/users/kjendrzyca/orgs","repos_url":"https://api.github.com/users/kjendrzyca/repos","events_url":"https://api.github.com/users/kjendrzyca/events{/privacy}","received_events_url":"https://api.github.com/users/kjendrzyca/received_events","type":"User","site_admin":false},"repo":{"id":54208828,"name":"corpo-food","full_name":"kjendrzyca/corpo-food","owner":{"login":"kjendrzyca","id":7491025,"avatar_url":"https://avatars.githubusercontent.com/u/7491025?v=3","gravatar_id":"","url":"https://api.github.com/users/kjendrzyca","html_url":"https://github.com/kjendrzyca","followers_url":"https://api.github.com/users/kjendrzyca/followers","following_url":"https://api.github.com/users/kjendrzyca/following{/other_user}","gists_url":"https://api.github.com/users/kjendrzyca/gists{/gist_id}","starred_url":"https://api.github.com/users/kjendrzyca/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kjendrzyca/subscriptions","organizations_url":"https://api.github.com/users/kjendrzyca/orgs","repos_url":"https://api.github.com/users/kjendrzyca/repos","events_url":"https://api.github.com/users/kjendrzyca/events{/privacy}","received_events_url":"https://api.github.com/users/kjendrzyca/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/kjendrzyca/corpo-food","description":null,"fork":false,"url":"https://api.github.com/repos/kjendrzyca/corpo-food","forks_url":"https://api.github.com/repos/kjendrzyca/corpo-food/forks","keys_url":"https://api.github.com/repos/kjendrzyca/corpo-food/keys{/key_id}","collaborators_url":"https://api.github.com/repos/kjendrzyca/corpo-food/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/kjendrzyca/corpo-food/teams","hooks_url":"https://api.github.com/repos/kjendrzyca/corpo-food/hooks","issue_events_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/events{/number}","events_url":"https://api.github.com/repos/kjendrzyca/corpo-food/events","assignees_url":"https://api.github.com/repos/kjendrzyca/corpo-food/assignees{/user}","branches_url":"https://api.github.com/repos/kjendrzyca/corpo-food/branches{/branch}","tags_url":"https://api.github.com/repos/kjendrzyca/corpo-food/tags","blobs_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/refs{/sha}","trees_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/trees{/sha}","statuses_url":"https://api.github.com/repos/kjendrzyca/corpo-food/statuses/{sha}","languages_url":"https://api.github.com/repos/kjendrzyca/corpo-food/languages","stargazers_url":"https://api.github.com/repos/kjendrzyca/corpo-food/stargazers","contributors_url":"https://api.github.com/repos/kjendrzyca/corpo-food/contributors","subscribers_url":"https://api.github.com/repos/kjendrzyca/corpo-food/subscribers","subscription_url":"https://api.github.com/repos/kjendrzyca/corpo-food/subscription","commits_url":"https://api.github.com/repos/kjendrzyca/corpo-food/commits{/sha}","git_commits_url":"https://api.github.com/repos/kjendrzyca/corpo-food/git/commits{/sha}","comments_url":"https://api.github.com/repos/kjendrzyca/corpo-food/comments{/number}","issue_comment_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/comments{/number}","contents_url":"https://api.github.com/repos/kjendrzyca/corpo-food/contents/{+path}","compare_url":"https://api.github.com/repos/kjendrzyca/corpo-food/compare/{base}...{head}","merges_url":"https://api.github.com/repos/kjendrzyca/corpo-food/merges","archive_url":"https://api.github.com/repos/kjendrzyca/corpo-food/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/kjendrzyca/corpo-food/downloads","issues_url":"https://api.github.com/repos/kjendrzyca/corpo-food/issues{/number}","pulls_url":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls{/number}","milestones_url":"https://api.github.com/repos/kjendrzyca/corpo-food/milestones{/number}","notifications_url":"https://api.github.com/repos/kjendrzyca/corpo-food/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/kjendrzyca/corpo-food/labels{/name}","releases_url":"https://api.github.com/repos/kjendrzyca/corpo-food/releases{/id}","deployments_url":"https://api.github.com/repos/kjendrzyca/corpo-food/deployments","created_at":"2016-03-18T14:48:31Z","updated_at":"2016-03-22T12:15:51Z","pushed_at":"2016-10-11T19:13:32Z","git_url":"git://github.com/kjendrzyca/corpo-food.git","ssh_url":"git@github.com:kjendrzyca/corpo-food.git","clone_url":"https://github.com/kjendrzyca/corpo-food.git","svn_url":"https://github.com/kjendrzyca/corpo-food","homepage":null,"size":486,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":3,"mirror_url":null,"open_issues_count":7,"forks":3,"open_issues":7,"watchers":1,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41"},"html":{"href":"https://github.com/kjendrzyca/corpo-food/pull/41"},"issue":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/41"},"comments":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/issues/41/comments"},"review_comments":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41/comments"},"review_comment":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/pulls/41/commits"},"statuses":{"href":"https://api.github.com/repos/kjendrzyca/corpo-food/statuses/73a61a7591ac5d4c0a2fd84fd6b452ce51c6c887"}}}}
{"actor":{"display_login":"kjendrzyca"}}