{"action":"created","issue":{"url":"https://api.github.com/repos/moneyadviceservice/rad/issues/216","labels_url":"https://api.github.com/repos/moneyadviceservice/rad/issues/216/labels{/name}","comments_url":"https://api.github.com/repos/moneyadviceservice/rad/issues/216/comments","events_url":"https://api.github.com/repos/moneyadviceservice/rad/issues/216/events","html_url":"https://github.com/moneyadviceservice/rad/pull/216","id":88385865,"number":216,"title":"In the dashboard, handle the case when there are no trading names","user":{"login":"munckymagik","id":306583,"avatar_url":"https://avatars.githubusercontent.com/u/306583?v=3","gravatar_id":"","url":"https://api.github.com/users/munckymagik","html_url":"https://github.com/munckymagik","followers_url":"https://api.github.com/users/munckymagik/followers","following_url":"https://api.github.com/users/munckymagik/following{/other_user}","gists_url":"https://api.github.com/users/munckymagik/gists{/gist_id}","starred_url":"https://api.github.com/users/munckymagik/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/munckymagik/subscriptions","organizations_url":"https://api.github.com/users/munckymagik/orgs","repos_url":"https://api.github.com/users/munckymagik/repos","events_url":"https://api.github.com/users/munckymagik/events{/privacy}","received_events_url":"https://api.github.com/users/munckymagik/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-06-15T10:36:57Z","updated_at":"2015-06-15T10:40:40Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/moneyadviceservice/rad/pulls/216","html_url":"https://github.com/moneyadviceservice/rad/pull/216","diff_url":"https://github.com/moneyadviceservice/rad/pull/216.diff","patch_url":"https://github.com/moneyadviceservice/rad/pull/216.patch"},"body":"Adds a message to explain why the trading names table is empty if there are none.\r\n![screen shot 2015-06-12 at 15 54 38 copy](https://cloud.githubusercontent.com/assets/306583/8158059/90a2c2dc-1351-11e5-95c2-4094118abf73.png)\r\n\r\nOr hides both the \"Trading Names\" and \"Available Trading Names\" sections if there are neither associated with the currently logged in principal/firm.\r\n\r\n## Testing Locally\r\n\r\n1. Follow the RAD set up instructions in the README.\r\n2. Fire up a Rails console\r\n3. Run the following to create a user/principal who has available trading names but hasn't added any yet:\r\n\r\n```ruby\r\nprincipal = FactoryGirl.create(:principal)\r\nuser = FactoryGirl.create(:user, principal: principal)\r\nfirm_attrs = FactoryGirl.attributes_for(:firm,\r\n                                        fca_number: principal.fca_number,\r\n                                        registered_name: principal.lookup_firm.registered_name)\r\nprincipal.firm.update_attributes(firm_attrs)\r\nlookup_trading_name = FactoryGirl.create(:lookup_subsidiary, fca_number: principal.fca_number)\r\n\"Log in as #{user.email}\"\r\n```\r\n\r\nThe username is whatever is in `user.email` and the test password from the Factory is `Password1!`.\r\n\r\n4. Fire up the local Rails development server \r\n5. Navigate to [http://localhost:3000/dashboard/firms](http://localhost:3000/dashboard/firms)\r\n"},"comment":{"url":"https://api.github.com/repos/moneyadviceservice/rad/issues/comments/112015237","html_url":"https://github.com/moneyadviceservice/rad/pull/216#issuecomment-112015237","issue_url":"https://api.github.com/repos/moneyadviceservice/rad/issues/216","id":112015237,"user":{"login":"mconnell","id":32398,"avatar_url":"https://avatars.githubusercontent.com/u/32398?v=3","gravatar_id":"","url":"https://api.github.com/users/mconnell","html_url":"https://github.com/mconnell","followers_url":"https://api.github.com/users/mconnell/followers","following_url":"https://api.github.com/users/mconnell/following{/other_user}","gists_url":"https://api.github.com/users/mconnell/gists{/gist_id}","starred_url":"https://api.github.com/users/mconnell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mconnell/subscriptions","organizations_url":"https://api.github.com/users/mconnell/orgs","repos_url":"https://api.github.com/users/mconnell/repos","events_url":"https://api.github.com/users/mconnell/events{/privacy}","received_events_url":"https://api.github.com/users/mconnell/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T10:40:40Z","updated_at":"2015-06-15T10:40:40Z","body":":+1: "}}