{"action":"created","comment":{"url":"https://api.github.com/repos/shoopio/shoop/pulls/comments/45835534","id":45835534,"diff_hunk":"@@ -0,0 +1,94 @@\n+/**\n+ * This file is part of Shoop.\n+ *\n+ * Copyright (c) 2012-2015, Shoop Ltd. All rights reserved.\n+ *\n+ * This source code is licensed under the AGPLv3 license found in the\n+ * LICENSE file in the root directory of this source tree.\n+ */\n+\n+function renderHeaders() {\n+    return  m(\"tr\", [\n+        m(\"th\", gettext(\"SKU\")),\n+        m(\"th\", gettext(\"Text\")),\n+        m(\"th\", gettext(\"Quantity\")),\n+        m(\"th\", gettext(\"Unit Price\")),\n+        m(\"th\", gettext(\"Discount amount\")),\n+        m(\"th\", gettext(\"Total (exclude taxes)\")),\n+        m(\"th\", gettext(\"Tax percent\")),\n+        m(\"th\", gettext(\"Total\"))\n+    ]);\n+}\n+\n+function renderLines(lines) {\n+    return _(lines).map((line) => {\n+        return m(\"tr\", [\n+            m(\"td\", line.sku),\n+            m(\"td\", line.text),\n+            m(\"td\", line.quantity),\n+            m(\"td\", line.unitPrice),\n+            m(\"td\", line.discountAmount),\n+            m(\"td\", line.taxlessTotal),\n+            m(\"td\", line.taxPercentage),\n+            m(\"td\", line.taxfulTotal)\n+        ]);\n+    }).compact().value();\n+}\n+\n+function renderTotals(source) {\n+    return m(\"tr\", [\n+        m(\"td\", \"\"),\n+        m(\"td\", \"\"),\n+        m(\"td\", \"\"),\n+        m(\"td\", \"\"),\n+        m(\"td\", source.totalDiscountAmount),\n+        m(\"td\", source.taxlessTotal),\n+        m(\"td\", \"\"),\n+        m(\"td\", source.taxfulTotal)\n+    ]);\n+}\n+\n+function renderAddress(address) {\n+    return _(address).map((line, index) => {\n+        if (index === 0) {\n+            return [\n+                m(\"strong\", line),\n+                m(\"br\")\n+            ];\n+        } else {\n+            return [\n+                line,\n+                m(\"br\")\n+            ];\n+        }\n+    }).compact().value();","path":"shoop/admin/modules/orders/static_src/create/view/confirm.js","position":64,"original_position":64,"commit_id":"40c495f7f86a86d3919e2154c27e53b993c79759","original_commit_id":"40c495f7f86a86d3919e2154c27e53b993c79759","user":{"login":"akx","id":58669,"avatar_url":"https://avatars.githubusercontent.com/u/58669?v=3","gravatar_id":"","url":"https://api.github.com/users/akx","html_url":"https://github.com/akx","followers_url":"https://api.github.com/users/akx/followers","following_url":"https://api.github.com/users/akx/following{/other_user}","gists_url":"https://api.github.com/users/akx/gists{/gist_id}","starred_url":"https://api.github.com/users/akx/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/akx/subscriptions","organizations_url":"https://api.github.com/users/akx/orgs","repos_url":"https://api.github.com/users/akx/repos","events_url":"https://api.github.com/users/akx/events{/privacy}","received_events_url":"https://api.github.com/users/akx/received_events","type":"User","site_admin":false},"body":"Use `flatten()` here (to turn `[[x,br],[y,br]]` into `[x,br,y,br]`","created_at":"2015-11-25T07:24:48Z","updated_at":"2015-11-25T07:24:48Z","html_url":"https://github.com/shoopio/shoop/pull/260#discussion_r45835534","pull_request_url":"https://api.github.com/repos/shoopio/shoop/pulls/260","_links":{"self":{"href":"https://api.github.com/repos/shoopio/shoop/pulls/comments/45835534"},"html":{"href":"https://github.com/shoopio/shoop/pull/260#discussion_r45835534"},"pull_request":{"href":"https://api.github.com/repos/shoopio/shoop/pulls/260"}}},"pull_request":{"url":"https://api.github.com/repos/shoopio/shoop/pulls/260","id":51756607,"html_url":"https://github.com/shoopio/shoop/pull/260","diff_url":"https://github.com/shoopio/shoop/pull/260.diff","patch_url":"https://github.com/shoopio/shoop/pull/260.patch","issue_url":"https://api.github.com/repos/shoopio/shoop/issues/260","number":260,"state":"open","locked":false,"title":"Admin: Manual orders","user":{"login":"tulimaki","id":4940349,"avatar_url":"https://avatars.githubusercontent.com/u/4940349?v=3","gravatar_id":"","url":"https://api.github.com/users/tulimaki","html_url":"https://github.com/tulimaki","followers_url":"https://api.github.com/users/tulimaki/followers","following_url":"https://api.github.com/users/tulimaki/following{/other_user}","gists_url":"https://api.github.com/users/tulimaki/gists{/gist_id}","starred_url":"https://api.github.com/users/tulimaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tulimaki/subscriptions","organizations_url":"https://api.github.com/users/tulimaki/orgs","repos_url":"https://api.github.com/users/tulimaki/repos","events_url":"https://api.github.com/users/tulimaki/events{/privacy}","received_events_url":"https://api.github.com/users/tulimaki/received_events","type":"User","site_admin":false},"body":"* Order creation dummy templates and initial styles\r\n* Admin browse widget: Add option to filter products based on shop\r\n* Fix product edit view orderability checks\r\n* Add footer styles for order-creator\r\n* Refactor order creation\r\n* Modify order creator actions and reducers for more complex views\r\n* Refactor order creation frontend\r\n* Refactor and add tests for order creator\r\n\r\nRefs SHOOP-1799","created_at":"2015-11-25T06:19:39Z","updated_at":"2015-11-25T07:24:48Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bb001fc218ed4a566ec0b6e976fa2190389b6b4b","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/shoopio/shoop/pulls/260/commits","review_comments_url":"https://api.github.com/repos/shoopio/shoop/pulls/260/comments","review_comment_url":"https://api.github.com/repos/shoopio/shoop/pulls/comments{/number}","comments_url":"https://api.github.com/repos/shoopio/shoop/issues/260/comments","statuses_url":"https://api.github.com/repos/shoopio/shoop/statuses/40c495f7f86a86d3919e2154c27e53b993c79759","head":{"label":"tulimaki:manual-orders","ref":"manual-orders","sha":"40c495f7f86a86d3919e2154c27e53b993c79759","user":{"login":"tulimaki","id":4940349,"avatar_url":"https://avatars.githubusercontent.com/u/4940349?v=3","gravatar_id":"","url":"https://api.github.com/users/tulimaki","html_url":"https://github.com/tulimaki","followers_url":"https://api.github.com/users/tulimaki/followers","following_url":"https://api.github.com/users/tulimaki/following{/other_user}","gists_url":"https://api.github.com/users/tulimaki/gists{/gist_id}","starred_url":"https://api.github.com/users/tulimaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tulimaki/subscriptions","organizations_url":"https://api.github.com/users/tulimaki/orgs","repos_url":"https://api.github.com/users/tulimaki/repos","events_url":"https://api.github.com/users/tulimaki/events{/privacy}","received_events_url":"https://api.github.com/users/tulimaki/received_events","type":"User","site_admin":false},"repo":{"id":41303409,"name":"shoop","full_name":"tulimaki/shoop","owner":{"login":"tulimaki","id":4940349,"avatar_url":"https://avatars.githubusercontent.com/u/4940349?v=3","gravatar_id":"","url":"https://api.github.com/users/tulimaki","html_url":"https://github.com/tulimaki","followers_url":"https://api.github.com/users/tulimaki/followers","following_url":"https://api.github.com/users/tulimaki/following{/other_user}","gists_url":"https://api.github.com/users/tulimaki/gists{/gist_id}","starred_url":"https://api.github.com/users/tulimaki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tulimaki/subscriptions","organizations_url":"https://api.github.com/users/tulimaki/orgs","repos_url":"https://api.github.com/users/tulimaki/repos","events_url":"https://api.github.com/users/tulimaki/events{/privacy}","received_events_url":"https://api.github.com/users/tulimaki/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tulimaki/shoop","description":"E-Commerce Platform","fork":true,"url":"https://api.github.com/repos/tulimaki/shoop","forks_url":"https://api.github.com/repos/tulimaki/shoop/forks","keys_url":"https://api.github.com/repos/tulimaki/shoop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tulimaki/shoop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tulimaki/shoop/teams","hooks_url":"https://api.github.com/repos/tulimaki/shoop/hooks","issue_events_url":"https://api.github.com/repos/tulimaki/shoop/issues/events{/number}","events_url":"https://api.github.com/repos/tulimaki/shoop/events","assignees_url":"https://api.github.com/repos/tulimaki/shoop/assignees{/user}","branches_url":"https://api.github.com/repos/tulimaki/shoop/branches{/branch}","tags_url":"https://api.github.com/repos/tulimaki/shoop/tags","blobs_url":"https://api.github.com/repos/tulimaki/shoop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tulimaki/shoop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tulimaki/shoop/git/refs{/sha}","trees_url":"https://api.github.com/repos/tulimaki/shoop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tulimaki/shoop/statuses/{sha}","languages_url":"https://api.github.com/repos/tulimaki/shoop/languages","stargazers_url":"https://api.github.com/repos/tulimaki/shoop/stargazers","contributors_url":"https://api.github.com/repos/tulimaki/shoop/contributors","subscribers_url":"https://api.github.com/repos/tulimaki/shoop/subscribers","subscription_url":"https://api.github.com/repos/tulimaki/shoop/subscription","commits_url":"https://api.github.com/repos/tulimaki/shoop/commits{/sha}","git_commits_url":"https://api.github.com/repos/tulimaki/shoop/git/commits{/sha}","comments_url":"https://api.github.com/repos/tulimaki/shoop/comments{/number}","issue_comment_url":"https://api.github.com/repos/tulimaki/shoop/issues/comments{/number}","contents_url":"https://api.github.com/repos/tulimaki/shoop/contents/{+path}","compare_url":"https://api.github.com/repos/tulimaki/shoop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tulimaki/shoop/merges","archive_url":"https://api.github.com/repos/tulimaki/shoop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tulimaki/shoop/downloads","issues_url":"https://api.github.com/repos/tulimaki/shoop/issues{/number}","pulls_url":"https://api.github.com/repos/tulimaki/shoop/pulls{/number}","milestones_url":"https://api.github.com/repos/tulimaki/shoop/milestones{/number}","notifications_url":"https://api.github.com/repos/tulimaki/shoop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tulimaki/shoop/labels{/name}","releases_url":"https://api.github.com/repos/tulimaki/shoop/releases{/id}","created_at":"2015-08-24T13:04:05Z","updated_at":"2015-08-24T13:04:06Z","pushed_at":"2015-11-24T19:22:12Z","git_url":"git://github.com/tulimaki/shoop.git","ssh_url":"git@github.com:tulimaki/shoop.git","clone_url":"https://github.com/tulimaki/shoop.git","svn_url":"https://github.com/tulimaki/shoop","homepage":"https://shoop.io","size":4134,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"shoopio:master","ref":"master","sha":"5a68a8a1ae8c42cfb9ec18912af1f5963bd97a3f","user":{"login":"shoopio","id":12714852,"avatar_url":"https://avatars.githubusercontent.com/u/12714852?v=3","gravatar_id":"","url":"https://api.github.com/users/shoopio","html_url":"https://github.com/shoopio","followers_url":"https://api.github.com/users/shoopio/followers","following_url":"https://api.github.com/users/shoopio/following{/other_user}","gists_url":"https://api.github.com/users/shoopio/gists{/gist_id}","starred_url":"https://api.github.com/users/shoopio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoopio/subscriptions","organizations_url":"https://api.github.com/users/shoopio/orgs","repos_url":"https://api.github.com/users/shoopio/repos","events_url":"https://api.github.com/users/shoopio/events{/privacy}","received_events_url":"https://api.github.com/users/shoopio/received_events","type":"Organization","site_admin":false},"repo":{"id":36803364,"name":"shoop","full_name":"shoopio/shoop","owner":{"login":"shoopio","id":12714852,"avatar_url":"https://avatars.githubusercontent.com/u/12714852?v=3","gravatar_id":"","url":"https://api.github.com/users/shoopio","html_url":"https://github.com/shoopio","followers_url":"https://api.github.com/users/shoopio/followers","following_url":"https://api.github.com/users/shoopio/following{/other_user}","gists_url":"https://api.github.com/users/shoopio/gists{/gist_id}","starred_url":"https://api.github.com/users/shoopio/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shoopio/subscriptions","organizations_url":"https://api.github.com/users/shoopio/orgs","repos_url":"https://api.github.com/users/shoopio/repos","events_url":"https://api.github.com/users/shoopio/events{/privacy}","received_events_url":"https://api.github.com/users/shoopio/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/shoopio/shoop","description":"E-Commerce Platform","fork":false,"url":"https://api.github.com/repos/shoopio/shoop","forks_url":"https://api.github.com/repos/shoopio/shoop/forks","keys_url":"https://api.github.com/repos/shoopio/shoop/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shoopio/shoop/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shoopio/shoop/teams","hooks_url":"https://api.github.com/repos/shoopio/shoop/hooks","issue_events_url":"https://api.github.com/repos/shoopio/shoop/issues/events{/number}","events_url":"https://api.github.com/repos/shoopio/shoop/events","assignees_url":"https://api.github.com/repos/shoopio/shoop/assignees{/user}","branches_url":"https://api.github.com/repos/shoopio/shoop/branches{/branch}","tags_url":"https://api.github.com/repos/shoopio/shoop/tags","blobs_url":"https://api.github.com/repos/shoopio/shoop/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shoopio/shoop/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shoopio/shoop/git/refs{/sha}","trees_url":"https://api.github.com/repos/shoopio/shoop/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shoopio/shoop/statuses/{sha}","languages_url":"https://api.github.com/repos/shoopio/shoop/languages","stargazers_url":"https://api.github.com/repos/shoopio/shoop/stargazers","contributors_url":"https://api.github.com/repos/shoopio/shoop/contributors","subscribers_url":"https://api.github.com/repos/shoopio/shoop/subscribers","subscription_url":"https://api.github.com/repos/shoopio/shoop/subscription","commits_url":"https://api.github.com/repos/shoopio/shoop/commits{/sha}","git_commits_url":"https://api.github.com/repos/shoopio/shoop/git/commits{/sha}","comments_url":"https://api.github.com/repos/shoopio/shoop/comments{/number}","issue_comment_url":"https://api.github.com/repos/shoopio/shoop/issues/comments{/number}","contents_url":"https://api.github.com/repos/shoopio/shoop/contents/{+path}","compare_url":"https://api.github.com/repos/shoopio/shoop/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shoopio/shoop/merges","archive_url":"https://api.github.com/repos/shoopio/shoop/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shoopio/shoop/downloads","issues_url":"https://api.github.com/repos/shoopio/shoop/issues{/number}","pulls_url":"https://api.github.com/repos/shoopio/shoop/pulls{/number}","milestones_url":"https://api.github.com/repos/shoopio/shoop/milestones{/number}","notifications_url":"https://api.github.com/repos/shoopio/shoop/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shoopio/shoop/labels{/name}","releases_url":"https://api.github.com/repos/shoopio/shoop/releases{/id}","created_at":"2015-06-03T12:53:21Z","updated_at":"2015-11-24T14:57:03Z","pushed_at":"2015-11-25T06:19:40Z","git_url":"git://github.com/shoopio/shoop.git","ssh_url":"git@github.com:shoopio/shoop.git","clone_url":"https://github.com/shoopio/shoop.git","svn_url":"https://github.com/shoopio/shoop","homepage":"https://shoop.io","size":6784,"stargazers_count":189,"watchers_count":189,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":60,"mirror_url":null,"open_issues_count":10,"forks":60,"open_issues":10,"watchers":189,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/shoopio/shoop/pulls/260"},"html":{"href":"https://github.com/shoopio/shoop/pull/260"},"issue":{"href":"https://api.github.com/repos/shoopio/shoop/issues/260"},"comments":{"href":"https://api.github.com/repos/shoopio/shoop/issues/260/comments"},"review_comments":{"href":"https://api.github.com/repos/shoopio/shoop/pulls/260/comments"},"review_comment":{"href":"https://api.github.com/repos/shoopio/shoop/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/shoopio/shoop/pulls/260/commits"},"statuses":{"href":"https://api.github.com/repos/shoopio/shoop/statuses/40c495f7f86a86d3919e2154c27e53b993c79759"}}}}