ohcnetwork / care_fe

Care is a Digital Public Good enabling TeleICU & Decentralised Administration of Healthcare Capacity across States.
https://care.ohc.network
MIT License
255 stars 441 forks source link

No Option to Clear The Selected Image On Sample Test Page #9153

Open nithish1018 opened 3 days ago

nithish1018 commented 3 days ago

Describe the bug There's no option to clear the selected image on images uploaded in sample test page

To Reproduce Steps to reproduce the behavior:

  1. Go to '/sample' page
  2. Click on Update Sample Test Status on any test card
  3. Select test completed in New Status Field
  4. Upload the image
  5. See the error

Expected behavior An option to clear the selected image should be provided

Screenshots

https://github.com/user-attachments/assets/5b3afd37-86d9-4bae-9ca3-580ef02f4fd1

Desktop (please complete the following information):

nithish1018 commented 3 days ago

@rithviknishad @Jacobjeevan I'd like to work on this issue

Jacobjeevan commented 3 days ago

Well, before user clicks upload, they can just click on the file name again to select a different file, though yea it's better to have a clear button there.

On a side note, I wonder if said clear button should also allow to clear after the file is uploaded and before submit is clicked (in which case, we might have to deal with archiving or deleting the file) @rithviknishad