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
+18
-3
No files matched your search
@@ -19,6 +19,7 @@
|
||||
<v-icon class="mx-1" icon="mdi-paperclip"></v-icon>
|
||||
<p>{{ (file.size / (1024 * 1024)).toFixed(2) }} MB</p>
|
||||
<v-icon size="small" icon="mdi-close" @click.stop="remove(uploadedFiles.indexOf(file))"></v-icon>
|
||||
<img v-if="isSaving" class="gif-loader" :src="require('@/plugins/app/_img/spinner.gif')" alt="Loading...">
|
||||
</v-chip>
|
||||
</div>
|
||||
</div>
|
||||
@@ -33,6 +34,11 @@ export default {
|
||||
files: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
},
|
||||
|
||||
isSaving: {
|
||||
type: Boolean,
|
||||
required: false
|
||||
}
|
||||
},
|
||||
|
||||
@@ -78,4 +84,7 @@ export default {
|
||||
position: absolute
|
||||
width: 1px
|
||||
height: 1px
|
||||
|
||||
.gif-loader
|
||||
height: 30px
|
||||
</style>
|
||||
@@ -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
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
@@ -55,7 +55,7 @@
|
||||
<QuillEditor ref="description" v-model="subtask.description" placeholder="Popis" theme="snow" class="rich-text-editor" @input="subtask.description = $event.srcElement.innerHTML" />
|
||||
</div>
|
||||
|
||||
<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" :is-saving="isSaving" />
|
||||
</v-card-actions>
|
||||
|
||||
<v-btn class="button primary" v-if="!isSaving" @click="save()">{{ subtask.id ? "UPRAVIŤ" : "VYTVORIŤ" }}</v-btn>
|
||||
|
||||
Reference in new issue
Block a user