mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
fixy
This commit is contained in:
1 parent
a2fb04d3b2
commit
63b66084e1
8 files changed
+42
-28
No files matched your search
@@ -430,10 +430,9 @@ export default {
|
||||
.vuecal__event
|
||||
border-radius: 16px
|
||||
// padding: 20px 10px
|
||||
min-height: 200px !important
|
||||
min-height: 70px !important
|
||||
text-align: left
|
||||
background: rgba(248, 248, 248, 1)
|
||||
min-height: 40px
|
||||
transition: min-height .4s, height .4s, box-shadow .4s, width .4s, left .4s
|
||||
|
||||
.custom-event-body
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<v-row class="px-10 py-8 subheader">
|
||||
<v-autocomplete :custom-filter="customFilter" :match-any="true" v-model="filter.projectId" class="subheader-input" :items="[...projectsOptions]" item-title="code" item-value="id" label="Projekt" variant="outlined" @update:search="projectCodeSearch = $event" />
|
||||
|
||||
<v-select v-model="filter.teamId" class="subheader-input" :items="[null, ...teams]" label="Tím" variant="outlined" item-title="name" item-value="id" />
|
||||
<v-autocomplete :custom-filter="customFilter" :match-any="true" v-model="filter.teamId" class="subheader-input" :items="[...teams]" item-title="name" item-value="id" label="Tím" variant="outlined" />
|
||||
|
||||
<v-autocomplete :custom-filter="customFilter" :match-any="true" v-model="filter.employeeId" class="subheader-input" :items="[...enrichedEmployees]" item-title="_fullName" item-value="id" label="Zamestnanec" variant="outlined" />
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
<div ref="page">
|
||||
<A-project-filter v-if="$store.getters['tm/isInitialized']" @filterChanged="onFilterChanged" />
|
||||
|
||||
<W-loadable :content="filteredProjects" emptyMessage="Nenašli sa žiadne vyhovujúce projekty">
|
||||
<W-loadable class="non-projects" :content="filteredProjects" emptyMessage="Nenašli sa žiadne vyhovujúce projekty">
|
||||
<A-project-calendar :events="filteredProjects" :month="filter.month" @open-detail="openMasterTaskModal" />
|
||||
</W-loadable>
|
||||
</div>
|
||||
@@ -90,4 +90,9 @@ export default {
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
<style lang="sass" scoped>
|
||||
.non-projects
|
||||
height: 27rem !important
|
||||
</style>
|
||||
@@ -1,14 +1,15 @@
|
||||
<template>
|
||||
<v-row class="px-10 py-8 subheader">
|
||||
<v-select
|
||||
v-model="selectedTeam"
|
||||
class="subheader-input"
|
||||
:items="teams"
|
||||
item-title="name"
|
||||
item-value="id"
|
||||
label="Tím"
|
||||
variant="outlined"
|
||||
></v-select>
|
||||
<v-autocomplete
|
||||
:custom-filter="customFilter"
|
||||
:match-any="true" v-model="selectedTeam"
|
||||
class="subheader-input"
|
||||
:items="teams"
|
||||
item-title="name"
|
||||
item-value="id"
|
||||
label="Tím"
|
||||
variant="outlined"
|
||||
/>
|
||||
<div class="d-flex date-wrapper">
|
||||
<v-btn class="subheader-icon-button prev" variant="outlined" @click="prevDay()"><img :src="require('@/plugins/app/_img/icons/icon-prev.svg')" alt=""></v-btn>
|
||||
<v-text-field
|
||||
@@ -32,9 +33,12 @@
|
||||
|
||||
<script>
|
||||
import { addDays, subDays } from 'date-fns'
|
||||
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin'
|
||||
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
mixins: [AutocompleteMixin],
|
||||
emits: ['filter-changed'],
|
||||
|
||||
props: {
|
||||
|
||||
@@ -111,7 +111,7 @@ export default {
|
||||
//fixnut validacie employee_id
|
||||
this.blocker = blocker
|
||||
} else {
|
||||
this.blocker = {start: null }
|
||||
this.blocker = {start: null, employee_id: this.user.id }
|
||||
|
||||
if (blocker.starts_at_time && blocker.datepicker && blocker.employee_id) {
|
||||
this.datepicker = blocker.datepicker
|
||||
|
||||
@@ -73,8 +73,11 @@ export default {
|
||||
'mastertask.team_id'(value) {
|
||||
if (!value) return
|
||||
|
||||
this.mastertask.team = this.teams.find(team => team.id == value)
|
||||
this.mastertask.employees = this.mastertask.team.employees
|
||||
const team = this.teams.find(team => team.id == value)
|
||||
if (!team) return
|
||||
|
||||
this.mastertask.team = JSON.parse(JSON.stringify(team))
|
||||
this.mastertask.employees = [...this.mastertask.team.employees]
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -256,7 +256,7 @@ export default {
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
this.$events.emit("on-subtask-edited", this.subtask)
|
||||
} else {
|
||||
const { subtasks } = await this.$axios.post_auth(`v1/mastertasks/${this.subtask.master_task_id}/subtasks`, this.subtask, this.subtask.project_code)
|
||||
const { subtasks } = await this.$axios.post_auth(`v1/mastertasks/${this.subtask.master_task_id}/subtasks`, this.subtask)
|
||||
this.subtask.id = subtasks[0].id
|
||||
|
||||
subtasks.forEach(subtask => {
|
||||
@@ -372,14 +372,10 @@ export default {
|
||||
deep: true
|
||||
},
|
||||
|
||||
'subtask.master_task_id'(value, newValue) {
|
||||
'subtask.master_task_id'(value) {
|
||||
if (!value) return
|
||||
this.subtask._master_task = this.mastertasks.find((mastertask) => mastertask.id == this.subtask.master_task_id)
|
||||
|
||||
// let selectedMasterTask = null
|
||||
|
||||
// if (newValue) selectedMasterTask = this.mastertasks.find((mastertask) => mastertask.id === newValue)
|
||||
// if (selectedMasterTask) this.subtask.project_code = selectedMasterTask.project_code
|
||||
this.subtask.project_code = this.subtask._master_task?.project_code || null
|
||||
},
|
||||
|
||||
editMode() {
|
||||
|
||||
@@ -15,8 +15,7 @@
|
||||
|
||||
<td>{{ subtask.project_code }}</td>
|
||||
<td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</td>
|
||||
<td v-if="subtask.deadline">{{ subtaskDeadline(subtask?.deadline) }}</td>
|
||||
<td v-else></td>
|
||||
<td>{{ getDeadline(subtask) }}</td>
|
||||
<td>{{ subtask.spent_time }} h</td>
|
||||
<td class="task-action">
|
||||
<div class="d-flex justify-start">
|
||||
@@ -32,6 +31,7 @@
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
@@ -41,6 +41,10 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('tm', ['mastertasks'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
editTask(subtask, editMode) {
|
||||
this.$events.emit('show-subtask-modal', {subtask, editMode})
|
||||
@@ -50,8 +54,11 @@ export default {
|
||||
this.$events.emit('show-delete-task-modal', {subtask})
|
||||
},
|
||||
|
||||
subtaskDeadline(value) {
|
||||
return moment(value).format('DD.MM.yyyy')
|
||||
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') : ''
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user