mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[mastertask, subtask] gif-loader pri odoslani requestu na create
This commit is contained in:
1 parent
d44493d0cf
commit
58351f61ea
3 files changed
+21
-6
No files matched your search
@@ -45,10 +45,11 @@
|
||||
<QuillEditor ref="description" v-model="mastertask.description" placeholder="Popis" theme="snow" class="rich-text-editor" @input="mastertask.description = $event.srcElement.innerHTML" />
|
||||
</div>
|
||||
|
||||
<Z-files-upload class="mt-15 files" :files="mastertask.files" @files-uploaded="filesUploaded" />
|
||||
<Z-files-upload class="mt-15 files" :files="mastertask.files" @files-uploaded="filesUploaded" :is-saving="isSaving" />
|
||||
</v-card-actions>
|
||||
|
||||
<v-btn class="button primary" @click="save()">{{ mastertask.id ? 'ULOŽIŤ' : 'VYTVORIŤ' }}</v-btn>
|
||||
<v-btn class="button primary" v-if="!isSaving" @click="save()">{{ mastertask.id ? 'ULOŽIŤ' : 'VYTVORIŤ' }}</v-btn>
|
||||
<v-btn class="button primary disabled" v-else disabled>{{ $t('Ukladám...')}}</v-btn>
|
||||
</v-card>
|
||||
|
||||
<v-card v-else height="100%" class="d-flex flex-column scrolling">
|
||||
@@ -130,6 +131,7 @@ export default {
|
||||
errorUtils,
|
||||
v$: useVuelidate(),
|
||||
mastertask: null,
|
||||
isSaving: false,
|
||||
showAddEmployeeInput: false,
|
||||
date: null,
|
||||
projectCodeSearch: null
|
||||
@@ -226,6 +228,7 @@ export default {
|
||||
},
|
||||
|
||||
async showModal({mastertask, editMode = false}) {
|
||||
this.isSaving = false
|
||||
this.editMode = null
|
||||
this.visible = true
|
||||
this.mastertask = null
|
||||
@@ -269,6 +272,7 @@ export default {
|
||||
this._mergeDeadlineTimeDate()
|
||||
|
||||
try {
|
||||
this.isSaving = true
|
||||
this.mastertask.deadline = moment(this.mastertask.deadline).format('YYYY-MM-DD HH:MM:SS')
|
||||
|
||||
if (this.mastertask.id) await this.$axios.put_auth_data(`v1/mastertasks/${this.mastertask.id}`, this.mastertask)
|
||||
@@ -278,6 +282,8 @@ export default {
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
} finally {
|
||||
this.isSaving = true
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user