diff --git a/app/src/plugins/app/_img/spinner.gif b/app/src/plugins/app/_img/spinner.gif
new file mode 100644
index 0000000..e9cf332
Binary files /dev/null and b/app/src/plugins/app/_img/spinner.gif differ
diff --git a/app/src/plugins/tm@_components/z-files-upload.vue b/app/src/plugins/tm@_components/z-files-upload.vue
index 5fe28f7..9d003b9 100644
--- a/app/src/plugins/tm@_components/z-files-upload.vue
+++ b/app/src/plugins/tm@_components/z-files-upload.vue
@@ -21,6 +21,9 @@
+
+
![Loading...]()
+
@@ -33,6 +36,11 @@ export default {
files: {
type: Array,
default: () => []
+ },
+
+ isSaving: {
+ type: Boolean,
+ required: false
}
},
@@ -78,4 +86,7 @@ export default {
position: absolute
width: 1px
height: 1px
+
+.gif-loader
+ height: 30px
\ No newline at end of file
diff --git a/app/src/plugins/tm@dashboard/projects/_components/a-project-filter.vue b/app/src/plugins/tm@dashboard/projects/_components/a-project-filter.vue
index 1c52ac4..4a37aa8 100644
--- a/app/src/plugins/tm@dashboard/projects/_components/a-project-filter.vue
+++ b/app/src/plugins/tm@dashboard/projects/_components/a-project-filter.vue
@@ -58,7 +58,6 @@ export default {
mounted() {
const monthIndex = new Date().getMonth()
this.filter.month = monthIndex < 9 ? `0${monthIndex + 1}` : `${monthIndex + 1}`
- console.log(this.enrichedEmployees)
},
computed: {
diff --git a/app/src/plugins/tm@modal/_components/read-only/z-files.vue b/app/src/plugins/tm@modal/_components/read-only/z-files.vue
index ba07b60..e9c9f4c 100644
--- a/app/src/plugins/tm@modal/_components/read-only/z-files.vue
+++ b/app/src/plugins/tm@modal/_components/read-only/z-files.vue
@@ -1,14 +1,19 @@
Prílohy
-
-
-
- {{ file.name }}
-
-
-
-
+
+
+
+ {{ file.name }}
+
+ {{ (file.file_size / (1024 * 1024)).toFixed(2) }} MB
+
+
+
![Loading...]()
+
Súbor sa sťahuje, počkajte prosím
+
+
+
@@ -18,7 +23,29 @@ export default {
files: {
type: Array,
default: () => []
- }
- }
+ },
+
+ downloadFile: {
+ type: Function,
+ required: true
+ },
+
+ showDownload: {
+ type: Boolean,
+ required: true
+ }
+ },
+
+ methods: {
+ handleDownload(index) {
+ this.downloadFile(index)
+ }
+ }
}
+
+
\ No newline at end of file
diff --git a/app/src/plugins/tm@modal/master-task/_components/a-mastertask-description.vue b/app/src/plugins/tm@modal/master-task/_components/a-mastertask-description.vue
index 30abd81..777ab30 100644
--- a/app/src/plugins/tm@modal/master-task/_components/a-mastertask-description.vue
+++ b/app/src/plugins/tm@modal/master-task/_components/a-mastertask-description.vue
@@ -7,10 +7,12 @@
-
+
\ No newline at end of file
diff --git a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
index 2a531e9..5f8c090 100644
--- a/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
+++ b/app/src/plugins/tm@modal/master-task/z-master-task-modal.vue
@@ -45,10 +45,11 @@
-
+
- {{ mastertask.id ? 'ULOŽIŤ' : 'VYTVORIŤ' }}
+ {{ mastertask.id ? 'ULOŽIŤ' : 'VYTVORIŤ' }}
+ {{ $t('Ukladám...')}}
@@ -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
}
},
diff --git a/app/src/plugins/tm@modal/task/_components/_components/a-task-spent-time.vue b/app/src/plugins/tm@modal/task/_components/_components/a-task-spent-time.vue
index 04a965c..b14830f 100644
--- a/app/src/plugins/tm@modal/task/_components/_components/a-task-spent-time.vue
+++ b/app/src/plugins/tm@modal/task/_components/_components/a-task-spent-time.vue
@@ -54,6 +54,7 @@ import moment from 'moment'
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
import useVuelidate from '@vuelidate/core'
import { required, numeric, minValue } from '@vuelidate/validators'
+import tmUtils from '@/plugins/tm@_utils/tm.utils'
export default {
props: {
@@ -101,12 +102,15 @@ export default {
time: typeof this.form.hours == 'string' ? parseFloat(this.form.hours) : this.form.hours
})
+ if(subtask.deadline) subtask.deadline = tmUtils.formatDateTimeForBackend(subtask.deadline)
+
this._update(subtask)
},
async deleteTimesheet({ id }) {
const subtask = JSON.parse(JSON.stringify(this.subtask))
subtask.timesheets = subtask.timesheets.filter(timesheet => timesheet.id != id)
+ if(subtask.deadline) subtask.deadline = tmUtils.formatDateTimeForBackend(subtask.deadline)
this._update(subtask)
},
diff --git a/app/src/plugins/tm@modal/task/_components/z-task-readonly-info.vue b/app/src/plugins/tm@modal/task/_components/z-task-readonly-info.vue
index 1887303..3ef482f 100644
--- a/app/src/plugins/tm@modal/task/_components/z-task-readonly-info.vue
+++ b/app/src/plugins/tm@modal/task/_components/z-task-readonly-info.vue
@@ -8,10 +8,12 @@
-
+
diff --git a/app/src/plugins/tm@modal/task/z-task-modal.vue b/app/src/plugins/tm@modal/task/z-task-modal.vue
index c7d3f3c..3000f0a 100644
--- a/app/src/plugins/tm@modal/task/z-task-modal.vue
+++ b/app/src/plugins/tm@modal/task/z-task-modal.vue
@@ -55,10 +55,11 @@
-
+
- {{ subtask.id ? "UPRAVIŤ" : "VYTVORIŤ" }}
+ {{ subtask.id ? "UPRAVIŤ" : "VYTVORIŤ" }}
+ {{ $t('Ukladám...')}}
@@ -138,6 +139,7 @@ export default {
editMode: false,
visible: false,
subtask: null,
+ isSaving: false,
errorUtils,
v$: useVuelidate(),
employeeValidations: [],
@@ -188,8 +190,9 @@ export default {
methods: {
async showModal({subtask, editMode = false, mastertask = {}}) {
- this.subtask = null
- this.visible = true
+ this.isSaving = false
+ this.subtask = null
+ this.visible = true
this.$nextTick(() => this.v$.$reset())
try {
@@ -233,6 +236,7 @@ export default {
this._mergeDeadlineTimeDate()
try {
+ this.isSaving = true
this.subtask.deadline = moment(this.subtask.deadline).format('YYYY-MM-DD HH:mm:SS')
if (this.subtask?.id) {
@@ -259,15 +263,8 @@ export default {
} catch (error) {
console.error(error)
this.$toast.error(error)
- }
- },
-
- async downloadFile(id) {
- try {
- const file = await this.$axios.get_auth_data(`v1/subtasks/${this.subtask.id}`, { responseType: "arraybuffer" })
- FileSaver.saveAs(file.files[id].path, file.files[id].name)
- } catch (error) {
- this.$toast.error(error)
+ } finally {
+ this.isSaving = true
}
},
diff --git a/app/src/plugins/w/loadable/_components/w-loadable.vue b/app/src/plugins/w/loadable/_components/w-loadable.vue
index 7e48953..2749c9d 100644
--- a/app/src/plugins/w/loadable/_components/w-loadable.vue
+++ b/app/src/plugins/w/loadable/_components/w-loadable.vue
@@ -54,6 +54,6 @@ export default {
\ No newline at end of file