I am currently customizing the header and I want to display the current login location in the header.
I thought I would find this information using the /session endpoint but this only has the logged in user details.
I followed you advice on using the appui/session endpoint and now a change of location from the homepage reflects on the OWA module I’m working on.
However, the question of setting the sessionLocation in reverse that is, from the OWA app we are building came about during the Addon manager demo and I thought of making a post to edit the /appui/session sessionLocation property, but it does not work.
I have also looked for documentation of this endpoint but can’t seem to find it.
Noted @darius,
I believe your first point can be solved by ensuring the generator-openmrs-owa scaffolds the UI widgets for the
page header. I’ll create a ticket for this and possibly look into it.
For your second point, should we disable the login location changing feature on other screens going forward?
For the first point, we should avoid duplicating the code in every every
owa. In other words, we should define the widget in an npm project like
“common-openmrs-react-widgets”, and the scaffolding can just include this.
For the second point, ignore this for now, and forget I said anything. (As
long as we can have a reusable widget and aren’t duplicating the business
logic in every OWA, it’s fine.)
@ivange94
I worked on this before to get another endpoint. But most of the previous OWA used this endpoint and I couldn’t find any other endpoint for this purpose.
@suthagar23 thanks. @dkayiwa any help here? We need to use this in radiology and declaring a dependency to appui which may also end up having other dependencies to use just one endpoint doesn’t sound like the right way for us. Do you think this can be moved to the webservices.rest module?