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
@@ -51,11 +51,7 @@
|
||||
</template>
|
||||
|
||||
<template v-slot:time-cell="{ hours, minutes }">
|
||||
<span class="d-flex align-center justify-center">
|
||||
<p>{{hours}}:{{String(minutes).padStart(2, '0')}}</p>
|
||||
<div class="time-column-line"></div>
|
||||
</span>
|
||||
<!-- <span class="d-flex justify-center">
|
||||
<span class="d-flex justify-center">
|
||||
<span class="d-flex justify-center">
|
||||
<p style="margin-top: -9px">{{hours}}:{{String(minutes).padStart(2, '0')}}</p>
|
||||
<div class="time-column-line"></div>
|
||||
@@ -65,7 +61,7 @@
|
||||
<span class="vuecal__time-cell-line" style="margin-top: 25px"></span>
|
||||
<span class="vuecal__time-cell-line" style="margin-top: 50px"></span>
|
||||
<span class="vuecal__time-cell-line" style="margin-top: 75px"></span>
|
||||
</span> -->
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<template v-slot:event="{ event }">
|
||||
@@ -121,24 +117,6 @@
|
||||
</div>
|
||||
</template>
|
||||
</Vue-cal>
|
||||
<!-- <v-dialog v-model="visible" max-width="750" persistent>
|
||||
<v-card>
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<h1 class="text-red">Ste si istý, že chcete pridať timeblock po deadline ?</h1>
|
||||
|
||||
<v-icon
|
||||
@click.stop="visible = false"
|
||||
icon="mdi-close"
|
||||
size="large"
|
||||
class="mb-15"
|
||||
></v-icon>
|
||||
</div>
|
||||
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||
<v-btn class="button primary half" variant="flat">ÁNO</v-btn>
|
||||
<v-btn class="button primary half outline" @click.stop="visible = false">ZRUŠIŤ</v-btn>
|
||||
</v-card-actions>
|
||||
</v-card>
|
||||
</v-dialog> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user