Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

OPD Visit Report - minor UX changes around view and print #996

Closed
mnorbeck opened this issue Mar 17, 2017 · 2 comments
Closed

OPD Visit Report - minor UX changes around view and print #996

mnorbeck opened this issue Mar 17, 2017 · 2 comments

Comments

@mnorbeck
Copy link

This is an enhancement request.

  1. On the Visit page, on the reports tab. Change the label of the button from "edit" to "view". When you go to the report page, you really cannot edit anything, so "Edit" is misleading.

  2. On the Visit page, on the reports tab, next to the (now View) button, please add a Print button.

  3. On the OPD report page itself, remove the "update" button. It is not really needed. When you open the report, you are already getting an "update" or "refresh" of the report, based on the latest visit info.....which is good. So, no need for an extra button.

@jkleinsc

@adeolabadmus
Copy link
Contributor

@mnorbeck, I worked on this issue. PR here

Item 1 is fairly straightforward.

For item 2, the implementation of the print button simply prints the current page (the way cmd+P works). Since the goal of the Print button is to print the report page, and not the visit page, the user has to be on the report page for that to work properly.

If the print button is added to the visit page, it can only work by coding it to first open the report page, and then trigger the print command. We already have the view button to accomplish that, and the user simply clicks the print button(or cmd+P).

However, I have implemented it, by loading the report page into an iframe, and then triggering the print command on document load. This works but feels a bit hacky, and in my opinion, clicking the view button to open the report page before printing is a better, straightforward way.

For Item 3, I think the update button is still necessary because we have report custom forms that can only be "updated" on the report page. Besides, removing the Update button breaks the Add button(displayed before the report is saved).

Cc @jkleinsc

@jkleinsc
Copy link
Member

@adeolabadmus I made some comments on the PR, including how you can determine when to display the Update button. Let me know if you have further questions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants