{"action":"created","comment":{"url":"https://api.github.com/repos/andela/activo-web/pulls/comments/207843207","pull_request_review_id":143534696,"id":207843207,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNzg0MzIwNw==","diff_hunk":"@@ -80,6 +83,21 @@ export const addNewAssetCategory = category => (dispatch) => {\n   });\n };\n \n+/**\n+ * @param {any} dispatch\n+ * @returns {void}\n+ */\n+export const downloadAssetCategories = () => (dispatch) => {\n+  return http.get('/asset-categories/export')\n+    .then((response) => {\n+      const file = new File([response.data], 'asset-categories.csv', { type: 'text/plain;charset=utf-8' });\n+      saveAs(file);\n+      dispatch(displayToastMessage('Download successful', 'success'));","path":"src/store/modules/categories/index.ts","position":29,"original_position":29,"commit_id":"c11965c73d336ceab9a8dd8fd13c7b61fd20461b","original_commit_id":"d05554a88f980629eca461d7395e2e8265edace4","user":{"login":"Billmike","id":24798364,"node_id":"MDQ6VXNlcjI0Nzk4MzY0","avatar_url":"https://avatars2.githubusercontent.com/u/24798364?v=4","gravatar_id":"","url":"https://api.github.com/users/Billmike","html_url":"https://github.com/Billmike","followers_url":"https://api.github.com/users/Billmike/followers","following_url":"https://api.github.com/users/Billmike/following{/other_user}","gists_url":"https://api.github.com/users/Billmike/gists{/gist_id}","starred_url":"https://api.github.com/users/Billmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Billmike/subscriptions","organizations_url":"https://api.github.com/users/Billmike/orgs","repos_url":"https://api.github.com/users/Billmike/repos","events_url":"https://api.github.com/users/Billmike/events{/privacy}","received_events_url":"https://api.github.com/users/Billmike/received_events","type":"User","site_admin":false},"body":"That's weird. It works fine in my own Chrome browser. ","created_at":"2018-08-06T10:27:08Z","updated_at":"2018-08-06T10:27:08Z","html_url":"https://github.com/andela/activo-web/pull/86#discussion_r207843207","pull_request_url":"https://api.github.com/repos/andela/activo-web/pulls/86","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/andela/activo-web/pulls/comments/207843207"},"html":{"href":"https://github.com/andela/activo-web/pull/86#discussion_r207843207"},"pull_request":{"href":"https://api.github.com/repos/andela/activo-web/pulls/86"}},"in_reply_to_id":207807988},"pull_request":{"url":"https://api.github.com/repos/andela/activo-web/pulls/86","id":206195391,"node_id":"MDExOlB1bGxSZXF1ZXN0MjA2MTk1Mzkx","html_url":"https://github.com/andela/activo-web/pull/86","diff_url":"https://github.com/andela/activo-web/pull/86.diff","patch_url":"https://github.com/andela/activo-web/pull/86.patch","issue_url":"https://api.github.com/repos/andela/activo-web/issues/86","number":86,"state":"open","locked":false,"title":"#159522992 Users can download asset categories as csv","user":{"login":"Billmike","id":24798364,"node_id":"MDQ6VXNlcjI0Nzk4MzY0","avatar_url":"https://avatars2.githubusercontent.com/u/24798364?v=4","gravatar_id":"","url":"https://api.github.com/users/Billmike","html_url":"https://github.com/Billmike","followers_url":"https://api.github.com/users/Billmike/followers","following_url":"https://api.github.com/users/Billmike/following{/other_user}","gists_url":"https://api.github.com/users/Billmike/gists{/gist_id}","starred_url":"https://api.github.com/users/Billmike/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Billmike/subscriptions","organizations_url":"https://api.github.com/users/Billmike/orgs","repos_url":"https://api.github.com/users/Billmike/repos","events_url":"https://api.github.com/users/Billmike/events{/privacy}","received_events_url":"https://api.github.com/users/Billmike/received_events","type":"User","site_admin":false},"body":"**What does this PR do?**\r\nImplements the functionality that enables a user to download the asset categories in csv format\r\n\r\n\r\n**Description of Task to be completed?**\r\n- create action creators to handle client-side request to download asset-categories\r\n- implement logic to download file as csv\r\n- write tests to cover implementation\r\n\r\n**How should this be manually tested?**\r\nAfter cloning the application, navigate to the dashboard and click on the `export` button. The download should begin and on successful download, the csv file should be saved to local memory.\r\n\r\n**Any background context you want to provide?**\r\nN/A\r\n\r\n**What are the relevant pivotal tracker stories?**\r\n[#159522992](https://www.pivotaltracker.com/story/show/159522992)\r\n\r\n**Screenshots (if appropriate)**\r\n<img width=\"1440\" alt=\"screen shot 2018-08-04 at 3 41 51 pm\" src=\"https://user-images.githubusercontent.com/24798364/43677629-f2467320-97fc-11e8-9ee7-3f4280cb7bc2.png\">\r\n\r\n\r\n**Questions:**\r\nN/A","created_at":"2018-08-04T14:42:48Z","updated_at":"2018-08-06T10:27:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":"aaa5c9fccaab53ee7e596ba044ec604ef4e07703","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":953906751,"node_id":"MDU6TGFiZWw5NTM5MDY3NTE=","url":"https://api.github.com/repos/andela/activo-web/labels/Finished","name":"Finished","color":"0e8a16","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/andela/activo-web/pulls/86/commits","review_comments_url":"https://api.github.com/repos/andela/activo-web/pulls/86/comments","review_comment_url":"https://api.github.com/repos/andela/activo-web/pulls/comments{/number}","comments_url":"https://api.github.com/repos/andela/activo-web/issues/86/comments","statuses_url":"https://api.github.com/repos/andela/activo-web/statuses/c11965c73d336ceab9a8dd8fd13c7b61fd20461b","head":{"label":"andela:ft-download-asset-categories-159522992","ref":"ft-download-asset-categories-159522992","sha":"c11965c73d336ceab9a8dd8fd13c7b61fd20461b","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":132578458,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI1Nzg0NTg=","name":"activo-web","full_name":"andela/activo-web","owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/activo-web","description":"Web client for the activo application","fork":false,"url":"https://api.github.com/repos/andela/activo-web","forks_url":"https://api.github.com/repos/andela/activo-web/forks","keys_url":"https://api.github.com/repos/andela/activo-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/activo-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/activo-web/teams","hooks_url":"https://api.github.com/repos/andela/activo-web/hooks","issue_events_url":"https://api.github.com/repos/andela/activo-web/issues/events{/number}","events_url":"https://api.github.com/repos/andela/activo-web/events","assignees_url":"https://api.github.com/repos/andela/activo-web/assignees{/user}","branches_url":"https://api.github.com/repos/andela/activo-web/branches{/branch}","tags_url":"https://api.github.com/repos/andela/activo-web/tags","blobs_url":"https://api.github.com/repos/andela/activo-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/activo-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/activo-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/activo-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/activo-web/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/activo-web/languages","stargazers_url":"https://api.github.com/repos/andela/activo-web/stargazers","contributors_url":"https://api.github.com/repos/andela/activo-web/contributors","subscribers_url":"https://api.github.com/repos/andela/activo-web/subscribers","subscription_url":"https://api.github.com/repos/andela/activo-web/subscription","commits_url":"https://api.github.com/repos/andela/activo-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/activo-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/activo-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/activo-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/activo-web/contents/{+path}","compare_url":"https://api.github.com/repos/andela/activo-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/activo-web/merges","archive_url":"https://api.github.com/repos/andela/activo-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/activo-web/downloads","issues_url":"https://api.github.com/repos/andela/activo-web/issues{/number}","pulls_url":"https://api.github.com/repos/andela/activo-web/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/activo-web/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/activo-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/activo-web/labels{/name}","releases_url":"https://api.github.com/repos/andela/activo-web/releases{/id}","deployments_url":"https://api.github.com/repos/andela/activo-web/deployments","created_at":"2018-05-08T08:28:37Z","updated_at":"2018-08-03T16:55:58Z","pushed_at":"2018-08-06T10:05:40Z","git_url":"git://github.com/andela/activo-web.git","ssh_url":"git@github.com:andela/activo-web.git","clone_url":"https://github.com/andela/activo-web.git","svn_url":"https://github.com/andela/activo-web","homepage":"http://activo-staging.andela.com","size":3101,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":4,"open_issues":13,"watchers":1,"default_branch":"develop"}},"base":{"label":"andela:develop","ref":"develop","sha":"7c7a62d401adbebee9d11289c20fd0d10942d1dd","user":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"repo":{"id":132578458,"node_id":"MDEwOlJlcG9zaXRvcnkxMzI1Nzg0NTg=","name":"activo-web","full_name":"andela/activo-web","owner":{"login":"andela","id":4100206,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQxMDAyMDY=","avatar_url":"https://avatars2.githubusercontent.com/u/4100206?v=4","gravatar_id":"","url":"https://api.github.com/users/andela","html_url":"https://github.com/andela","followers_url":"https://api.github.com/users/andela/followers","following_url":"https://api.github.com/users/andela/following{/other_user}","gists_url":"https://api.github.com/users/andela/gists{/gist_id}","starred_url":"https://api.github.com/users/andela/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andela/subscriptions","organizations_url":"https://api.github.com/users/andela/orgs","repos_url":"https://api.github.com/users/andela/repos","events_url":"https://api.github.com/users/andela/events{/privacy}","received_events_url":"https://api.github.com/users/andela/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/andela/activo-web","description":"Web client for the activo application","fork":false,"url":"https://api.github.com/repos/andela/activo-web","forks_url":"https://api.github.com/repos/andela/activo-web/forks","keys_url":"https://api.github.com/repos/andela/activo-web/keys{/key_id}","collaborators_url":"https://api.github.com/repos/andela/activo-web/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/andela/activo-web/teams","hooks_url":"https://api.github.com/repos/andela/activo-web/hooks","issue_events_url":"https://api.github.com/repos/andela/activo-web/issues/events{/number}","events_url":"https://api.github.com/repos/andela/activo-web/events","assignees_url":"https://api.github.com/repos/andela/activo-web/assignees{/user}","branches_url":"https://api.github.com/repos/andela/activo-web/branches{/branch}","tags_url":"https://api.github.com/repos/andela/activo-web/tags","blobs_url":"https://api.github.com/repos/andela/activo-web/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/andela/activo-web/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/andela/activo-web/git/refs{/sha}","trees_url":"https://api.github.com/repos/andela/activo-web/git/trees{/sha}","statuses_url":"https://api.github.com/repos/andela/activo-web/statuses/{sha}","languages_url":"https://api.github.com/repos/andela/activo-web/languages","stargazers_url":"https://api.github.com/repos/andela/activo-web/stargazers","contributors_url":"https://api.github.com/repos/andela/activo-web/contributors","subscribers_url":"https://api.github.com/repos/andela/activo-web/subscribers","subscription_url":"https://api.github.com/repos/andela/activo-web/subscription","commits_url":"https://api.github.com/repos/andela/activo-web/commits{/sha}","git_commits_url":"https://api.github.com/repos/andela/activo-web/git/commits{/sha}","comments_url":"https://api.github.com/repos/andela/activo-web/comments{/number}","issue_comment_url":"https://api.github.com/repos/andela/activo-web/issues/comments{/number}","contents_url":"https://api.github.com/repos/andela/activo-web/contents/{+path}","compare_url":"https://api.github.com/repos/andela/activo-web/compare/{base}...{head}","merges_url":"https://api.github.com/repos/andela/activo-web/merges","archive_url":"https://api.github.com/repos/andela/activo-web/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/andela/activo-web/downloads","issues_url":"https://api.github.com/repos/andela/activo-web/issues{/number}","pulls_url":"https://api.github.com/repos/andela/activo-web/pulls{/number}","milestones_url":"https://api.github.com/repos/andela/activo-web/milestones{/number}","notifications_url":"https://api.github.com/repos/andela/activo-web/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/andela/activo-web/labels{/name}","releases_url":"https://api.github.com/repos/andela/activo-web/releases{/id}","deployments_url":"https://api.github.com/repos/andela/activo-web/deployments","created_at":"2018-05-08T08:28:37Z","updated_at":"2018-08-03T16:55:58Z","pushed_at":"2018-08-06T10:05:40Z","git_url":"git://github.com/andela/activo-web.git","ssh_url":"git@github.com:andela/activo-web.git","clone_url":"https://github.com/andela/activo-web.git","svn_url":"https://github.com/andela/activo-web","homepage":"http://activo-staging.andela.com","size":3101,"stargazers_count":1,"watchers_count":1,"language":"TypeScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":4,"mirror_url":null,"archived":false,"open_issues_count":13,"license":null,"forks":4,"open_issues":13,"watchers":1,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/andela/activo-web/pulls/86"},"html":{"href":"https://github.com/andela/activo-web/pull/86"},"issue":{"href":"https://api.github.com/repos/andela/activo-web/issues/86"},"comments":{"href":"https://api.github.com/repos/andela/activo-web/issues/86/comments"},"review_comments":{"href":"https://api.github.com/repos/andela/activo-web/pulls/86/comments"},"review_comment":{"href":"https://api.github.com/repos/andela/activo-web/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/andela/activo-web/pulls/86/commits"},"statuses":{"href":"https://api.github.com/repos/andela/activo-web/statuses/c11965c73d336ceab9a8dd8fd13c7b61fd20461b"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"Billmike"}}