diff --git a/app/src/plugins/app@vendor/vue-cal/styles.scss b/app/src/plugins/app@vendor/vue-cal/styles.scss index d8a3329..d41e67f 100644 --- a/app/src/plugins/app@vendor/vue-cal/styles.scss +++ b/app/src/plugins/app@vendor/vue-cal/styles.scss @@ -179,9 +179,7 @@ $splits-headers-height: 1.5em; color: #999; text-align: right; font-size: 0.9em; - // background: white; - // remove -v - padding-right: 2px; + background: white; } .vuecal__time-cell-line:before { @@ -189,15 +187,12 @@ $splits-headers-height: 1.5em; position: absolute; left: 0; right: 0; - // remove -v - border-top: 1px solid rgba(196, 196, 196, 0.3); - // border-top: 1px solid #F5F5F5; + border-top: 1px solid #F5F5F5; z-index: -1; } - //add -v - // .vuecal__time-cell-line.hour:before { - // border-top: 1px solid #e0e0e0; - // } + .vuecal__time-cell-line.hour:before { + border-top: 1px solid #e0e0e0; + } } // Calendar cells. diff --git a/app/src/plugins/tm@_components/z-files-upload.vue b/app/src/plugins/tm@_components/z-files-upload.vue index 8555385..cea1589 100644 --- a/app/src/plugins/tm@_components/z-files-upload.vue +++ b/app/src/plugins/tm@_components/z-files-upload.vue @@ -72,7 +72,7 @@ export default { remove(index) { this.uploadedFiles.splice(index, 1) - }, + } }, } diff --git a/app/src/plugins/tm@dashboard/_components/z-timeline.vue b/app/src/plugins/tm@dashboard/_components/z-timeline.vue index 4fc75b2..abc8f3e 100644 --- a/app/src/plugins/tm@dashboard/_components/z-timeline.vue +++ b/app/src/plugins/tm@dashboard/_components/z-timeline.vue @@ -51,11 +51,7 @@ - @@ -196,19 +174,32 @@ export default { }, methods: { - getDeadline(subtask) { - if(subtask.deadline) return moment(subtask.deadline).format('DD.MM.yyyy') - else if(!this.mastertasks) return '' - const masterTask = this.mastertasks.find((mt) => mt.id === subtask.master_task_id) - return moment(masterTask).format('DD.MM.yyyy') ? moment(masterTask.deadline).format('DD.MM.yyyy') : '' - }, - isAfterDeadline(event) { const deadline = this.getDeadline(event.subtask) - if (deadline) { - return this.tmUtils.isAfter(event.date, moment(deadline, 'DD.MM.yyyy')) - } - return false + + if (!deadline) + return + + const mDate = moment(event.date) + const mDeadline = moment(deadline) + const hours = event.end.getHours() + const minutes = event.end.getMinutes() + + mDate.hours(hours) + mDate.minutes(minutes) + + return mDate.isAfter(mDeadline) + }, + + getDeadline(subtask) { + if (subtask?.deadline) + return subtask.deadline + + if (!this.mastertasks) + return null + + const masterTask = this.mastertasks.find((mt) => mt.id === subtask.master_task_id) + return masterTask.deadline }, weekChanged() { @@ -220,7 +211,6 @@ export default { const date = addDays(this.calConfig.date, newSplit - 1) const start = date.setHours(Math.round(event.startTimeMinutes / 60), Math.round(event.startTimeMinutes % 60), 0) const end = date.setHours(Math.round(event.endTimeMinutes / 60), Math.round(event.endTimeMinutes % 60), 0) - const split = this.splits.find(split => split.id == newSplit ) if(this.$route.name == 'Dashboard - Tasks') { @@ -251,20 +241,6 @@ export default { const isAfterDeadline = this.isAfterDeadline(event) if(isAfterDeadline) this.$toast.error('Timeblock, ktorý ste presunuli je po deadline !') - - // if (isAfterDeadline) { - // this.visible = true - // } else { - // try { - // const { subtask } = await this.$axios.put_auth(`v1/subtasks/${editedSubtask.id}`, editedSubtask) - // this.$events.emit('on-subtask-edited', subtask) - - // if (subtask.employee_id == this.$store.getters['auth/user'].id) - // this.$events.emit('show-task-add-time-modal', { subtask }) - // } catch (error) { - // this.$toast.error(error.message || error) - // } - // } } else if(this.$route.name == 'Dashboard - Teams') { const editedSubtask = { ...event.subtask, 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 c14797e..adfadc6 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 @@ -47,15 +47,7 @@ export default { } finally { file.isLoading = false } - }, - - // async downloadAllFiles() { - // for (const file of this.files) { - // if (!file.isLoading) { - // await this.downloadFile(file) - // } - // } - // } + } } } diff --git a/app/src/plugins/tm@modal/task/_components/_components/a-task-deadline.vue b/app/src/plugins/tm@modal/task/_components/_components/a-task-deadline.vue index 7b72387..8e37e18 100644 --- a/app/src/plugins/tm@modal/task/_components/_components/a-task-deadline.vue +++ b/app/src/plugins/tm@modal/task/_components/_components/a-task-deadline.vue @@ -10,7 +10,7 @@ -

{{ tmUtils.formatDate(subtask.deadline) }}

+

{{ tmUtils.formatDate(subtask.deadline) }} {{ deadlineTime }}