Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app

This commit is contained in:
Matej Glasnák committed 2023-02-10 00:07:09 +01:00
commit 37331335ce
4 files changed
+26 -6

No files matched your search

+10 -1
View File
@@ -335,7 +335,7 @@
:class="[index === 0 ? 'ml-0' : 'ml-2']"
>
<v-chip class="mt-2">
<p @click="downloadFile" class="cursor-pointer">
<p @click="downloadFile(index)" class="cursor-pointer">
{{ file.name }}
</p>
<v-icon
@@ -493,6 +493,15 @@ export default {
}
},
async downloadFile(id) {
try {
const file = await this.$axios.get_auth_data(`v1/subtasks/${this.task.id}`, { responseType: 'arraybuffer' })
FileSaver.saveAs(file.files[id].path, file.files[id].name)
} catch(error) {
this.$toast.error(error)
}
},
removeDate(index) {
this.task.timeblocks.splice(index, 1)
},