New action button

Hello community

Is it possible to change the name of the new action button below dynamically for example when you click on the people tab the new action button has the a different name ie Resources and when you click on a particular patient in switches to the default New action ? Or it requires a change in the core code base of CHT ?
Screenshot from 2022-08-08 10-00-41

Short answer is no. I do not think it is currently possible to dynamically change the label on that button. (Should, of course, be able to supply a custom translation to statically set the label, but it will not dynamically change based on context.)

I do have a couple of other thoughts. First, it is worth noting that there are some proposed UI changes that I believe would impact that button specifically (changing it to just a :heavy_plus_sign: button following the standard material design). I am not sure how that might look different on a desktop browser, though.

Also, the idea of adding custom actions to the action bar is the kind of thing that would be really interesting to propose as a use-case for a plugin/add-on!

3 Likes

thanks @jkuester for the detailed response

1 Like

helo @jkuester @binod

Do we have a New Action for an offline user in 4.x ,

For the admin user it displays properly

But for a non-admin offline user , when the the button is clicked it just opens the enrollment phone

Clicking the FAB button for any user should pop a dialog containing all “add” actions that the specific user can perform in the current context. The contents of the dialog can change based on the type/permissions of user and the details of the contact that is currently in context.

I would not expect the dialog to generally be exactly the same for online/offline users since their permissions and the kinds of forms they will have access to will be different. To be clear, though, the actions that a user has access to should not be at all affected by using the FAB button. What ever forms the user could previously access should still be accessible with the updated UI.

2 Likes