mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 06:20:21 +00:00
[Task] File uplaod loader
This commit is contained in:
1 parent
f8656396e7
commit
d44493d0cf
1 file changed
+7
-1
@@ -58,7 +58,8 @@
|
|||||||
<Z-files-upload class="mt-15 files" :files="subtask.files" @files-uploaded="filesUploaded" />
|
<Z-files-upload class="mt-15 files" :files="subtask.files" @files-uploaded="filesUploaded" />
|
||||||
</v-card-actions>
|
</v-card-actions>
|
||||||
|
|
||||||
<v-btn class="button primary" @click="save()">{{ subtask.id ? "UPRAVIŤ" : "VYTVORIŤ" }}</v-btn>
|
<v-btn class="button primary" v-if="!isSaving" @click="save()">{{ subtask.id ? "UPRAVIŤ" : "VYTVORIŤ" }}</v-btn>
|
||||||
|
<v-btn class="button primary disabled" v-else disabled>{{ $t('Ukladám...')}}</v-btn>
|
||||||
</v-card>
|
</v-card>
|
||||||
|
|
||||||
<v-card v-else height="100%" class="d-flex flex-column scrolling">
|
<v-card v-else height="100%" class="d-flex flex-column scrolling">
|
||||||
@@ -138,6 +139,7 @@ export default {
|
|||||||
editMode: false,
|
editMode: false,
|
||||||
visible: false,
|
visible: false,
|
||||||
subtask: null,
|
subtask: null,
|
||||||
|
isSaving: false,
|
||||||
errorUtils,
|
errorUtils,
|
||||||
v$: useVuelidate(),
|
v$: useVuelidate(),
|
||||||
employeeValidations: [],
|
employeeValidations: [],
|
||||||
@@ -188,6 +190,7 @@ export default {
|
|||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
async showModal({subtask, editMode = false, mastertask = {}}) {
|
async showModal({subtask, editMode = false, mastertask = {}}) {
|
||||||
|
this.isSaving = false
|
||||||
this.subtask = null
|
this.subtask = null
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.$nextTick(() => this.v$.$reset())
|
this.$nextTick(() => this.v$.$reset())
|
||||||
@@ -233,6 +236,7 @@ export default {
|
|||||||
this._mergeDeadlineTimeDate()
|
this._mergeDeadlineTimeDate()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
this.isSaving = true
|
||||||
this.subtask.deadline = moment(this.subtask.deadline).format('YYYY-MM-DD HH:mm:SS')
|
this.subtask.deadline = moment(this.subtask.deadline).format('YYYY-MM-DD HH:mm:SS')
|
||||||
|
|
||||||
if (this.subtask?.id) {
|
if (this.subtask?.id) {
|
||||||
@@ -259,6 +263,8 @@ export default {
|
|||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error)
|
console.error(error)
|
||||||
this.$toast.error(error)
|
this.$toast.error(error)
|
||||||
|
} finally {
|
||||||
|
this.isSaving = true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user