mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
[CR] vodiace linky, [app] bugs
This commit is contained in:
1 parent
f40065ffd1
commit
0a4c2ef44a
8 files changed
+76
-80
No files matched your search
@@ -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)
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
</v-col>
|
||||
<v-col cols="7">
|
||||
<v-sheet class="py-3">
|
||||
<p v-if="subtask.deadline" :class="`${tmUtils.isAfter(subtask.deadline) ? 'text-black' : 'text-red-darken-4'}`">{{ tmUtils.formatDate(subtask.deadline) }}</p>
|
||||
<p v-if="subtask.deadline" :class="`${tmUtils.isAfter(subtask.deadline) ? 'text-black' : 'text-red-darken-4'}`">{{ tmUtils.formatDate(subtask.deadline) }} {{ deadlineTime }}</p>
|
||||
<v-tooltip v-else text="Deadline z Mastertasku" location="end">
|
||||
<template v-slot:activator="{ props }">
|
||||
<span class="cursor-pointer" v-bind="props">{{ getMasterTaskDeadline(subtask) }}*</span>
|
||||
@@ -35,7 +35,14 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('tm', ['mastertasks'])
|
||||
...mapGetters('tm', ['mastertasks']),
|
||||
|
||||
deadlineTime() {
|
||||
const time = this.subtask?._deadline_time
|
||||
if (time)
|
||||
return moment(time, 'HH:mm:ss').format('HH:mm')
|
||||
return ''
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
@@ -48,7 +55,7 @@ export default {
|
||||
getMasterTaskDeadline(subtask) {
|
||||
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') : ''
|
||||
return tmUtils.formatDateTime(masterTask) ? tmUtils.formatDateTime(masterTask.deadline) : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -246,17 +246,30 @@ export default {
|
||||
|
||||
isAfterDeadline() {
|
||||
const deadline = this.getDeadline(this.subtask)
|
||||
if (deadline) {
|
||||
return this.tmUtils.isAfter(this.form.date, moment(deadline, 'DD.MM.yyyy'))
|
||||
}
|
||||
return false
|
||||
|
||||
if (!deadline)
|
||||
return
|
||||
|
||||
const mDate = moment(this.form.date)
|
||||
const mDeadline = moment(deadline)
|
||||
|
||||
const [hours, minutes] = this.form.ends_at_time.split(':').map(Number)
|
||||
|
||||
mDate.hours(hours)
|
||||
mDate.minutes(minutes)
|
||||
|
||||
return mDate.isAfter(mDeadline)
|
||||
},
|
||||
|
||||
getDeadline(subtask) {
|
||||
if(subtask.deadline) return moment(subtask.deadline).format('DD.MM.yyyy')
|
||||
else if(!this.mastertasks) return ''
|
||||
if (subtask?.deadline)
|
||||
return subtask.deadline
|
||||
|
||||
if (!this.mastertasks)
|
||||
return null
|
||||
|
||||
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') : ''
|
||||
return masterTask.deadline
|
||||
},
|
||||
|
||||
closeModal() {
|
||||
|
||||
@@ -270,6 +270,7 @@ export default {
|
||||
return timesheet
|
||||
})
|
||||
|
||||
// const { subtask } = await this.$axios.patch_auth_form(`v1/subtasks/${this.subtask.id}`, { ...this.subtask, timesheets })
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${this.subtask.id}`, { ...this.subtask, timesheets })
|
||||
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
|
||||
Reference in new issue
Block a user