SolutionGuidance / psm

Welcome to the Medicare/Medicaid Provider Enrollment Screening Portal
http://projectpsm.org/
Other
26 stars 20 forks source link

Improve the Upload File UI on two pages #1089

Closed PaulMorris closed 5 years ago

PaulMorris commented 5 years ago

These commits are from @jasonaowen 's PR #1074. These two commits/pages did not work as expected so I'm separating them out into their own PR for further work.

On these pages (in the Public Health Nursing Organization and Physician Clinic applications), you can submit a file and the file name shows up as expected, but when you save as draft or move away from that page and go back, the button says "upload" again and there's no download link, as if you hadn't uploaded the file. When logging in as an admin, the UI is the same ("upload" button), so it appears that the file is not being uploaded.

(I rebased the commits on master and did a tiny bit of reformatting.)

Issue #158 "No file selected" is confusing when a file is uploaded Resolves #734 Moving backward in PHN enrollment loses county contract

jasonaowen commented 5 years ago

@PaulMorris it may be that we're not adding all the information needed to the model; I think I remember that problem on some of the other forms. It might be worthwhile to look at the variables we set in the form binder, and making sure we're including the previously-updated attachment ID in the variables we're searching.

Sorry to put partially completed work on your shoulders! Thanks for carrying this forward.

PaulMorris commented 5 years ago

Thanks for the tips @jasonaowen! I took another look today, and the problem was just that I did not check the checkbox (or radio button) next to the file upload button on these pages. If you do that, then everything works as expected. Navigating away from the page and coming back you see the "Download/Replace" state, and after submitting the applications and logging in as an admin, you see the "Download/Replace" state when editing, and downloading the uploaded files succeeds.

So, nothing to see here... In a follow-up it might be worth improving the UI to keep users from getting tripped up by this (e.g. disable upload button until checkbox is checked, or check the box on upload), but this PR is ready for review and merging. I'll remove the WIP in the title. Screenshots for the record:

Public Health Nursing Organization:

screenshot_2018-09-18 facility credentials 1

Physician Clinic:

screenshot_2018-09-18 facility credentials 2

PaulMorris commented 5 years ago

I checked and this PR does resolve issue #734.

PaulMorris commented 5 years ago

I'm going to merge this. I've reviewed @jasonaowen 's work and I didn't add anything so there's nothing else to review.