{"action":"opened","issue":{"url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/712","labels_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/712/labels{/name}","comments_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/712/comments","events_url":"https://api.github.com/repos/IMA-WorldHealth/bhima/issues/712/events","html_url":"https://github.com/IMA-WorldHealth/bhima/issues/712","id":105349992,"number":712,"title":"Improvements to Stock Management Page","user":{"login":"jniles","id":896472,"avatar_url":"https://avatars.githubusercontent.com/u/896472?v=3","gravatar_id":"","url":"https://api.github.com/users/jniles","html_url":"https://github.com/jniles","followers_url":"https://api.github.com/users/jniles/followers","following_url":"https://api.github.com/users/jniles/following{/other_user}","gists_url":"https://api.github.com/users/jniles/gists{/gist_id}","starred_url":"https://api.github.com/users/jniles/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jniles/subscriptions","organizations_url":"https://api.github.com/users/jniles/orgs","repos_url":"https://api.github.com/users/jniles/repos","events_url":"https://api.github.com/users/jniles/events{/privacy}","received_events_url":"https://api.github.com/users/jniles/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-09-08T10:33:27Z","updated_at":"2015-09-08T10:33:27Z","closed_at":null,"body":"I suggest that we make our stock routes more in line with our design primary cash.  For example, currently `#/stock/` gives the perspective of a warehouse/depot.  I propose we change this to either of the following three names: `#/warehouse/`, `#/pharmacy/` or `#/depot`.  Personally, like `/warehouse` or `/pharmacy` best.\r\n\r\n(I'll be referring to warehouse/depot/pharmacy entity as warehouse from now on).  Secondly, it would be nice (and easy) to cache the warehouse/depot/pharmacy ID in the URL.  This means that when nothing is selected, we navigate to `#/warehouse`, we get to choose what warehouse we are in by selecting those large buttons.  When you choose one, the ID is stuffed in the URL, like this `#/warehouse/7c4f84cc-8521-4ffc-b645-96578ad4ea2d`.  We could figure out how to shorten this by doing something like `#/warehouse/{{warehousename}}-{{first six digits of ID}}`.  However, even with a long URL, I would be happy.  Then, something like distribution to services would look like `/warehouse/7c4f84cc-8521-4ffc-b645-96578ad4ea2d/distribution_service`.\r\n\r\nThe reason for caching the ID in the URL is that we can then link directly to a given  warehouse from a report.  For example, if we have warehouse ID, we can say \"distribute these drugs\" on a stock entry report and have `href=\"#/warehouse/7c4f84cc-8521-4ffc-b645-96578ad4ea2d/distribution_service\"`.  (This is a bad/contrived example, of course, but the power is still there).  You can also have a global stock movements report and then link to \"See the stock movements for this warehouse\", and go straight into the warehouse page.\r\n\r\nWhat do you all think?"}}