Currently the PDU relating to the user is stored in session and used to scope which users and patients are seen down to the PDU.
Superusers and RCPCH team members need to be able to change the PDU/organisation in the session. One suggestion here is for some HTMX and a custom threeway button component with a select, as in E12. The idea would be that a user with national access can view individual organisations within a PDU, the whole PDU as an entity, or nationally (ie all patients/users). This means:
a new threeway button and select as a partial
new htmx post urls to fire on click, with a custom function in the header out of band to refresh the table.
logic in the views POST methods to update the session and return the updated partial to the template.
add permissions to these endpoints to ensure only the right users can access.
Currently the PDU relating to the user is stored in session and used to scope which users and patients are seen down to the PDU.
Superusers and RCPCH team members need to be able to change the PDU/organisation in the session. One suggestion here is for some HTMX and a custom threeway button component with a select, as in E12. The idea would be that a user with national access can view individual organisations within a PDU, the whole PDU as an entity, or nationally (ie all patients/users). This means: