Support mobile document uploads #1869
Open
+66
−14
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds support for mobile document uploads by exposing a file input in the postings section. This allows for easy upload of documents for a specific transaction and account.
I considered adding a file input to the Context dialog, but that proved to be a dead-end since the entry hash changes on file upload. In order to support that, there would either need to be a way to re-calculate the hash after file upload and then reload the context dialog without disturbing unsaved changes, or a way to send the file upload and changes to the transactions in a single atomic PUT request. Those are both possible, but probably not worth the effort.
This alternative implementation has a bit better UX in my opinion, as it allows to easily associate a document with an account simply by clicking the file upload button next to the posting entry.
closes #979