As an NGO user, I want to upload multiple copies of personal documents belonging to my beneficiary, so that I can have all the beneficiary's documents in one place in the case file.
Description:
Users should have a location to upload all the personal documents of the beneficiary, in the beneficiary's case file. This section is named Documente, and it only allows uploading, previewing, downloading and deleting uploaded files. Users can also edit metadata of documents such as document name, type & observations to the document if needed. All documents are displayed in a list.
Preconditions
Users must have permissions to view the case file in order to access this section
Main flow
User navigates to Documente section, from the Case Overview page, within an Individual Beneficiary file
The system retrieves a table with all the available documents (ALT Flow - if no documents are available, user will view an empty state of the table - see figma)
User clicks on Upload document (ro: Incarca document).
System displays modal screen Upload document (ro: Incarca document)
User fills in the fields in the modal: Selects type of document, Enters a name for the document, Enters observations, Loads document + hits Save document (ro. Adauga document)
System closes modal and displays the list of documents, with the new document in portview
Toast message/ Snackbar is displayed (Document incarcat cu succes)
To view document, user clicks on table line to open preview
The system displays the document in preview
User can download the document or delete it from preview (if needed)
Business rules
Accepted files for upload are PDF, DOC, DOCX, XLS, CSV, PNG, TIFF, JPG. If document fails filetype verification, user receives a system error at document upload
Maximum file size is 25MB
Mandatory fields in upload modal are Type of document, Name of document and File upload. Observations is optional.
Maximum field length for Name of document field is 200 characters
Maximum field legth for Observations field (text area) is 500 characters
Document type options for dropdown is listed in Data dictionary, variable DOC_TYP
Save document button is inactive until all mandatory fields are filled in
A document can only be previewed if filetype is PDF, JPG, PNG, TIFF. If a document cannot be previewed, users will receive a message: Formatul documentului nu permite previzualizarea lui. Descărcați documentul pentru a-l putea vizualiza.
Documents are listed by default in table in reverse chronological order (last updated is on the top of the table).
Document list can be filtered by date of upload and type of document
[x] The system allows only .pdf file upload. See above in the Business rules section all the file formats that should be accepted
[x] There is no preview of the document implemented. The user should be able to preview the document by clicking on the "Vezi detalii" button. Also, implement the preview document for filetypes OTHER THAN the ones accepted (see here the design)
[x] There is no Delete feature implemented. The user cannot delete an existing document (see here the design)
[x] The edit feature is not implemented according to the design. The user should have the "Actualizează detalii document button" in the preview of the document, which will trigger the "Actualizează detalii document modal screen" where the user can update the fields. (see here the design)
[x] The Download feature is not implemented according to the design. The user should be able to download the document from the preview by clicking on the "Descarcă document" button (See here the design)
[x] Wrong button label. Current label ''Încarcă un document''. Expected label ''Încarcă document''
Please consult the design and the explanations in the ticket
User story:
As an NGO user, I want to upload multiple copies of personal documents belonging to my beneficiary, so that I can have all the beneficiary's documents in one place in the case file.
Description:
Users should have a location to upload all the personal documents of the beneficiary, in the beneficiary's case file. This section is named Documente, and it only allows uploading, previewing, downloading and deleting uploaded files. Users can also edit metadata of documents such as document name, type & observations to the document if needed. All documents are displayed in a list.
Preconditions
Main flow
Business rules
Additional information
FIGMA File link: https://www.figma.com/design/gpOGCkb9B6pTfe1DvleVMm/Sunrise?node-id=4596-8399&t=Y67FQop49wG0iHQb-4