mirror of
https://github.com/hay-kot/homebox.git
synced 2025-07-26 20:40:26 +00:00
feat: add receipt support for attachments (#89)
* add receipt support for attachments * fix show logic
This commit is contained in:
parent
dbaaf4ad0a
commit
57f9372e49
6 changed files with 25 additions and 4 deletions
|
@ -190,6 +190,7 @@
|
|||
const dropAttachment = (files: File[] | null) => uploadAttachment(files, AttachmentTypes.Attachment);
|
||||
const dropWarranty = (files: File[] | null) => uploadAttachment(files, AttachmentTypes.Warranty);
|
||||
const dropManual = (files: File[] | null) => uploadAttachment(files, AttachmentTypes.Manual);
|
||||
const dropReceipt = (files: File[] | null) => uploadAttachment(files, AttachmentTypes.Receipt);
|
||||
|
||||
async function uploadAttachment(files: File[] | null, type: AttachmentTypes) {
|
||||
if (!files && files.length === 0) {
|
||||
|
@ -378,6 +379,7 @@
|
|||
<DropZone @drop="dropWarranty"> Warranty </DropZone>
|
||||
<DropZone @drop="dropManual"> Manual </DropZone>
|
||||
<DropZone @drop="dropAttachment"> Attachment </DropZone>
|
||||
<DropZone @drop="dropReceipt"> Receipt </DropZone>
|
||||
</div>
|
||||
<button
|
||||
v-else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue