diff --git a/src/components/upload-file/UploadFileCard.vue b/src/components/upload-file/UploadFileCard.vue index c25787d7..50b30cac 100644 --- a/src/components/upload-file/UploadFileCard.vue +++ b/src/components/upload-file/UploadFileCard.vue @@ -75,7 +75,7 @@ onMounted(() => { color="positive" size="1rem" /> - {{ idle ? '' : progress !== 1 ? `Uploading...` : 'Completed' }} + {{ idle ? `Pending` : progress !== 1 ? `Uploading...` : 'Completed' }} { attachmentList = f; attachmentData = []; - Array.from(f).forEach(({ name }) => { + Array.from(f).forEach((el) => { attachmentData.push({ - name: name, + name: el.name, progress: 1, loaded: 0, - total: 0, + total: el.size, placeholder: true, }); }); @@ -685,6 +685,10 @@ onMounted(async () => { " @remove=" async (n) => { + const attIndex = attachmentData.findIndex((v) => v.name === n); + + attachmentData.splice(attIndex, 1); + if (!creditNoteData) return; await remove(creditNoteData.id, n); }