mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
bugy + CR
This commit is contained in:
1 parent
8972b538ea
commit
5c8daca94f
11 files changed
+48
-26
No files matched your search
@@ -76,7 +76,7 @@
|
||||
<A-tasks-table :subtasks="mastertask.subtasks" />
|
||||
|
||||
<div class="d-flex align-center ">
|
||||
<v-btn class="subtask-btn w-100" @click="addTask()" ><v-icon class="mx-1" icon="mdi-plus" />Pridať task</v-btn>
|
||||
<v-btn class="subtask-btn w-100" @click="addTask()" ><v-icon class="mx-1" icon="mdi-plus" />Pridať sub task</v-btn>
|
||||
</div>
|
||||
</div>
|
||||
</v-card-actions>
|
||||
|
||||
@@ -10,28 +10,46 @@
|
||||
</v-col>
|
||||
<v-col cols="7">
|
||||
<v-sheet class="py-3">
|
||||
<p v-if="deadline" :class="`${tmUtils.isAfter(deadline) ? 'text-black' : 'text-red-darken-4'}`">{{ tmUtils.formatDate(deadline) }}</p>
|
||||
<p v-else>Tento task nema určený deadline</p>
|
||||
<p v-if="subtask.deadline" :class="`${tmUtils.isAfter(subtask.deadline) ? 'text-black' : 'text-red-darken-4'}`">{{ tmUtils.formatDate(subtask.deadline) }}</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>
|
||||
</template>
|
||||
</v-tooltip>
|
||||
</v-sheet>
|
||||
</v-col>
|
||||
</v-row>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
deadline: {
|
||||
subtask: {
|
||||
type: [String, Object, null],
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('tm', ['mastertasks'])
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
tmUtils
|
||||
}
|
||||
},
|
||||
|
||||
methods: {
|
||||
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') : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<A-mastertask-name :name="subtask._master_task.name" :id="subtask.master_task_id" :color="subtask._master_task.color" @close-modal="$emit('close-modal')" />
|
||||
<A-mastertask-status :isFinished="subtask.is_finished" />
|
||||
<A-task-deadline :deadline="subtask.deadline" />
|
||||
<A-task-deadline :subtask="subtask" />
|
||||
<A-task-timeblocks :timeblocks="subtask.timeblocks" :subtask="subtask" @update-subtask="$emit('update-subtask', $event)" />
|
||||
<Z-created-by :employee-id="subtask.created_by" />
|
||||
<A-task-assigned-employee :employee="subtask._employee" />
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-dialog v-model="visible" max-width="750" persistent>
|
||||
<v-card>
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<h1>Ste si istý, že chcete {{ subtask.is_finished ? 'znovu otvoriť' : 'dokončiť' }} task, z mastertasku <b>{{ subtask?.master_task?.name || subtask.master_task }}</b>?</h1>
|
||||
<h1>Ste si istý, že chcete {{ subtask.is_finished ? 'znovu otvoriť' : 'dokončiť' }} sub task, z mastertasku <b>{{ subtask?.master_task?.name || subtask.master_task }}</b>?</h1>
|
||||
<v-icon
|
||||
@click.stop="closeModal()"
|
||||
icon="mdi-close"
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-dialog v-model="visible" max-width="750" persistent>
|
||||
<v-card>
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<h1>Ste si istý, že chcete zmazať task z mastertasku <b>{{ subtask.project_code }}</b>?</h1>
|
||||
<h1>Ste si istý, že chcete zmazať sub task z mastertasku <b>{{ subtask.project_code }}</b>?</h1>
|
||||
|
||||
<v-icon
|
||||
@click.stop="closeModal()"
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<W-loadable :content="subtask" class="h-100">
|
||||
<v-card v-if="editMode" height="100%" class="d-flex flex-column scrolling">
|
||||
<div class="d-flex justify-space-between align-center modal-header">
|
||||
<h1>{{ subtask?.id ? 'Upraviť task' : 'Vytvoriť task' }}</h1>
|
||||
<h1>{{ subtask?.id ? 'Upraviť sub task' : 'Vytvoriť sub task' }}</h1>
|
||||
<v-icon @click.stop="closeModal()" icon="mdi-close" size="large"></v-icon>
|
||||
</div>
|
||||
|
||||
|
||||
@@ -113,10 +113,14 @@ export default {
|
||||
try {
|
||||
if (this.team.id) {
|
||||
const { team } = await this.$axios.put_auth(`v1/teams/${this.team.id}`, this.team)
|
||||
this.$store.commit('tm/update_team', team)
|
||||
|
||||
const fullTeamResource = await this.$axios.get_auth_data(`v1/teams/${team.id}`)
|
||||
this.$store.commit('tm/update_team', fullTeamResource)
|
||||
} else {
|
||||
const { team } = await this.$axios.post_auth(`v1/teams`, this.team)
|
||||
this.$store.commit('tm/save_team', team)
|
||||
|
||||
const fullTeamResource = await this.$axios.get_auth_data(`v1/teams/${team.id}`)
|
||||
this.$store.commit('tm/save_team', fullTeamResource)
|
||||
}
|
||||
|
||||
this.closeModal()
|
||||
|
||||
Reference in new issue
Block a user