mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[detail modals] download files, [projects overview] project filter
This commit is contained in:
1 parent
6e8f57d06d
commit
dca66d9a50
4 files changed
+26
-6
No files matched your search
@@ -269,7 +269,7 @@
|
||||
<div class="w-100 d-flex align-center">
|
||||
<div v-for="(file, index) in masterTask.files" :key="file.id" class="d-flex align-center flex-wrap" :class="[index === 0 ? 'ml-0': 'ml-2']">
|
||||
<v-chip class="mt-2">
|
||||
<p @click="downloadFile" class="cursor-pointer">{{ file.name }}</p>
|
||||
<p @click="downloadFile(index)" class="cursor-pointer">{{ file.name }}</p>
|
||||
<v-icon class="mx-1" icon="mdi-paperclip"></v-icon>
|
||||
</v-chip>
|
||||
</div>
|
||||
@@ -395,6 +395,14 @@ export default {
|
||||
|
||||
},
|
||||
|
||||
async downloadFile(id) {
|
||||
try {
|
||||
const file = await this.$axios.get_auth_data(`v1/mastertasks/${this.masterTask.id}`, { responseType: 'arraybuffer' })
|
||||
FileSaver.saveAs(file.files[id].path, file.files[id].name)
|
||||
} catch(error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
},
|
||||
|
||||
async showModal(masterTask, editMode = false) {
|
||||
this.v$.$reset()
|
||||
|
||||
Reference in new issue
Block a user