Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implemented uploading xml files on expense import page #1982

Merged
merged 7 commits into from
Aug 20, 2024

Conversation

Civolilah
Copy link
Collaborator

@beganovich @turbo124 The PR includes the implementation of XML file uploading for expenses. The functionality includes accepting only .xml files along with CHECKING the length of lines that the file is made of. If the file has only one line, we will display a message in the toaster from the xml_lines_length keyword (we are missing this keyword from the files, if you agree, please just add it there). The payload is constructed from the import_type: expense and files as binary type. There is also functionality for REMOVING files after they are uploaded. For the final import of files I used /api/v1/edocument/upload POST route. Screenshots:

Screenshot 2024-08-15 at 11 14 19

Screenshot 2024-08-15 at 11 14 38

Screenshot 2024-08-15 at 11 37 40

Note: We miss "xml_file" translation keyword, if you would agree, please just add it into files.

Closes: #1904

Let me know your thoughts.

@turbo124
Copy link
Member

@Civolilah

I think this is missing some addtional props

_method: PUT
documents[]: (binary)

@Civolilah Civolilah marked this pull request as draft August 16, 2024 18:00
@turbo124
Copy link
Member

@Civolilah I've updated the functionality here and have this working now. Can we just please ensure that on a successful upload, we clear the documents from the dropzone :)

image

@Civolilah
Copy link
Collaborator Author

@Civolilah I've updated the functionality here and have this working now. Can we just please ensure that on a successful upload, we clear the documents from the dropzone :)

image

@turbo124 It should be adjusted just as you explained. Please let me know your thoughts.

@Civolilah Civolilah marked this pull request as ready for review August 19, 2024 14:45
@beganovich beganovich merged commit e89e049 into invoiceninja:develop Aug 20, 2024
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants