mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 14:29:34 +00:00
Merge branch 'main' of bitbucket.org:studiotem/jandl-taskmanager-app
This commit is contained in:
commit
6b4784788d
25 files changed
+140
-34
No files matched your search
@@ -65,6 +65,7 @@ transition-group.vuecal__cell(
|
||||
import Event from './event.vue'
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
inject: ['vuecal', 'utils', 'modules', 'view', 'domEvents'],
|
||||
@@ -262,11 +263,11 @@ export default {
|
||||
dateTo.setHours(dateFrom.getHours() + 1)
|
||||
|
||||
const time = moment(dateFrom).format('HH:mm')
|
||||
const date = moment(dateFrom).format('DD.MM.yyyy')
|
||||
|
||||
this.$events.emit('show-menu-modal', {
|
||||
time: time,
|
||||
date: date
|
||||
this.$events.emit('show-menu-modal', {
|
||||
time: time,
|
||||
date: tmUtils.formatDateTimeForBackend(dateFrom),
|
||||
employee: this.user.id
|
||||
})
|
||||
|
||||
setTimeout(() => {
|
||||
@@ -309,6 +310,7 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters("auth", ["user"]),
|
||||
// Drag & drop module.
|
||||
dnd () {
|
||||
return this.modules.dnd
|
||||
|
||||
@@ -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>
|
||||
@@ -91,3 +91,8 @@ export default {
|
||||
}
|
||||
}
|
||||
</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"
|
||||
<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"
|
||||
></v-select>
|
||||
/>
|
||||
<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: {
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
export default {
|
||||
mounted() {
|
||||
window.addEventListener('keydown', this.handleKeyDown)
|
||||
},
|
||||
|
||||
methods: {
|
||||
handleKeyDown(event) {
|
||||
if (event.keyCode === 27) this.closeModal()
|
||||
}
|
||||
},
|
||||
}
|
||||
@@ -44,9 +44,10 @@ import VuetifyFixFocusMixin from "@/plugins/tm@modal/_mixins/vuetify-fix-focus"
|
||||
import { mapGetters } from "vuex"
|
||||
import moment from "moment"
|
||||
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [VuetifyFixFocusMixin, AutocompleteMixin],
|
||||
mixins: [VuetifyFixFocusMixin, AutocompleteMixin, modalMixin],
|
||||
|
||||
emits: ["close"],
|
||||
|
||||
@@ -63,7 +64,8 @@ export default {
|
||||
blocker: null,
|
||||
datepicker: null,
|
||||
starts_at_time: null,
|
||||
ends_at_time: null
|
||||
ends_at_time: null,
|
||||
employee: null
|
||||
}
|
||||
},
|
||||
|
||||
@@ -109,11 +111,12 @@ 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) {
|
||||
if (blocker.starts_at_time && blocker.datepicker && blocker.employee_id) {
|
||||
this.datepicker = blocker.datepicker
|
||||
this.starts_at_time = blocker.starts_at_time
|
||||
this.blocker.employee_id = blocker.employee_id
|
||||
}
|
||||
}
|
||||
} catch (error) {
|
||||
@@ -136,6 +139,7 @@ export default {
|
||||
}
|
||||
|
||||
this.$events.emit("on-blocker-edited", this.blocker)
|
||||
this.$events.emit("blocker-created")
|
||||
this.closeModal()
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['on-blocker-deleted'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -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]
|
||||
},
|
||||
}
|
||||
}
|
||||
@@ -20,7 +20,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['on-mastertask-deleted'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -28,8 +28,10 @@
|
||||
|
||||
<script>
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
data() {
|
||||
return {
|
||||
visible: false,
|
||||
|
||||
@@ -96,6 +96,7 @@ import VuetifyFixFocusMixin from '@/plugins/tm@modal/_mixins/vuetify-fix-focus'
|
||||
import moment from 'moment'
|
||||
import { QuillEditor } from '@vueup/vue-quill'
|
||||
// import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
import '@vueup/vue-quill/dist/vue-quill.snow.css'
|
||||
|
||||
@@ -112,7 +113,7 @@ export default {
|
||||
// watch: mastertask.team_id
|
||||
|
||||
emits: ['master-task-edited', 'close'],
|
||||
mixins: [VuetifyFixFocusMixin, SelectsMixin, AutocompleteMixin],
|
||||
mixins: [VuetifyFixFocusMixin, SelectsMixin, AutocompleteMixin, modalMixin],
|
||||
|
||||
components: {
|
||||
AMastertaskDescription,
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
<v-card-actions class="mt-10 d-flex justify-start align-center mobile-view">
|
||||
<v-btn class="button primary half outline" @click.stop="createTask()"
|
||||
>TASK</v-btn
|
||||
>SUB TASK</v-btn
|
||||
>
|
||||
<v-btn class="button primary half outline" @click.stop="createBlocker()"
|
||||
>BLOCKER</v-btn
|
||||
@@ -19,9 +19,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
emits: ['update', 'data'],
|
||||
props: ['data'],
|
||||
mixins: [ modalMixin ],
|
||||
|
||||
data() {
|
||||
return {
|
||||
@@ -30,6 +33,16 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
mounted() {
|
||||
this.$events.on('blocker-created', () => {
|
||||
this.closeModal()
|
||||
})
|
||||
|
||||
this.$events.on('task-created', () => {
|
||||
this.closeModal()
|
||||
})
|
||||
},
|
||||
|
||||
methods: {
|
||||
async showModal(data) {
|
||||
this.localData = data
|
||||
@@ -44,8 +57,11 @@ export default {
|
||||
this.$events.emit('show-subtask-modal', {
|
||||
subtask: {
|
||||
deadline: this.localData.date,
|
||||
_deadline_time: this.localData.time,
|
||||
_deadline_time: this.localData.time
|
||||
},
|
||||
onTaskCreated: () => {
|
||||
this.closeModal()
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -54,7 +70,11 @@ export default {
|
||||
blocker: {
|
||||
starts_at_time: this.localData.time,
|
||||
datepicker: this.localData.date,
|
||||
employee_id: this.localData.employee
|
||||
},
|
||||
onBlockerCreated: () => {
|
||||
this.closeModal()
|
||||
}
|
||||
})
|
||||
},
|
||||
},
|
||||
|
||||
@@ -15,6 +15,11 @@
|
||||
{{ employee.name.charAt(0) + employee.surname.charAt(0) }}
|
||||
</p>
|
||||
<p class="ml-2" v-html="`${employee.name} ${employee.surname}`" />
|
||||
<!-- <v-tooltip text="Vymazať priradeného zamestnanca" location="top">
|
||||
<template v-slot:activator="{ props }">
|
||||
<v-icon v-bind="props" class="ml-2 cursor-pointer" icon="mdi-close" />
|
||||
</template>
|
||||
</v-tooltip> -->
|
||||
</v-sheet>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
<v-col cols="7">
|
||||
<v-sheet class="py-3">
|
||||
<p>{{ hours }} h</p>
|
||||
<p>{{ (hours).toFixed(2) }} h</p>
|
||||
</v-sheet>
|
||||
</v-col>
|
||||
</v-row>
|
||||
|
||||
@@ -57,8 +57,10 @@ import useVuelidate from '@vuelidate/core'
|
||||
import { required, numeric, minValue } from '@vuelidate/validators'
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import { mapGetters } from 'vuex'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
props: {
|
||||
hours: {
|
||||
type: Number,
|
||||
|
||||
@@ -49,10 +49,12 @@ import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { required } from '@vuelidate/validators'
|
||||
import Datepicker from '@vuepic/vue-datepicker'
|
||||
import moment from 'moment'
|
||||
import Datepicker from '@vuepic/vue-datepicker'
|
||||
import moment from 'moment'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['update-subtask'],
|
||||
|
||||
components: {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<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>
|
||||
<v-icon
|
||||
@click.stop="visible = false"
|
||||
@click.stop="closeModal()"
|
||||
icon="mdi-close"
|
||||
size="large"
|
||||
></v-icon>
|
||||
@@ -18,7 +18,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['close', 'on-subtask-edited'],
|
||||
|
||||
data() {
|
||||
@@ -47,6 +50,10 @@ export default {
|
||||
} catch (error) {
|
||||
this.$toast.error(error)
|
||||
}
|
||||
},
|
||||
|
||||
closeModal() {
|
||||
this.visible = false
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['on-subtask-deleted'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -18,8 +18,10 @@
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { required, numeric, minValue } from '@vuelidate/validators'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['close', 'on-subtask-edited'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -66,7 +66,7 @@
|
||||
<div class="d-flex justify-space-between align-center">
|
||||
<div>
|
||||
<p>{{ subtask._master_task.project_code }}</p>
|
||||
<h1>{{ subtask._master_task.name }}</h1>
|
||||
<h1>{{ subtask._master_task.name }}</h1>
|
||||
</div>
|
||||
|
||||
<v-icon @click.stop="closeModal()" icon="mdi-close" size="large" class="pb-5"></v-icon>
|
||||
@@ -120,10 +120,11 @@ import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin'
|
||||
|
||||
import ZTaskReadonlyInfo from "./_components/z-task-readonly-info.vue"
|
||||
import { mapGetters } from "vuex"
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
emits: ["close", "refresh"],
|
||||
mixins: [VuetifyFixFocusMixin, SelectsMixin, AutocompleteMixin],
|
||||
mixins: [VuetifyFixFocusMixin, SelectsMixin, AutocompleteMixin, modalMixin],
|
||||
|
||||
components: {
|
||||
ZTaskReadonlyInfo,
|
||||
@@ -209,6 +210,11 @@ export default {
|
||||
this.subtask = this._enrichTask(data)
|
||||
} else {
|
||||
this.subtask = { master_task: mastertask, employees: [{}], _deadline_time: '17:00' }
|
||||
|
||||
if (subtask?.deadline && subtask._deadline_time) {
|
||||
this.subtask.deadline = subtask.deadline
|
||||
this.subtask._deadline_time = subtask._deadline_time
|
||||
}
|
||||
}
|
||||
|
||||
this.editMode = editMode || !this.subtask.id
|
||||
@@ -257,6 +263,7 @@ export default {
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
this.$events.emit("on-subtask-edited", this.subtask)
|
||||
})
|
||||
this.$events.emit("task-created")
|
||||
}
|
||||
|
||||
this.closeModal()
|
||||
@@ -368,6 +375,7 @@ export default {
|
||||
'subtask.master_task_id'(value) {
|
||||
if (!value) return
|
||||
this.subtask._master_task = this.mastertasks.find((mastertask) => mastertask.id == this.subtask.master_task_id)
|
||||
this.subtask.project_code = this.subtask._master_task?.project_code || null
|
||||
},
|
||||
|
||||
editMode() {
|
||||
|
||||
@@ -17,7 +17,10 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
export default {
|
||||
mixins: [ modalMixin ],
|
||||
emits: ['update'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -37,17 +37,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { required } from '@vuelidate/validators'
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import { mapGetters } from 'vuex'
|
||||
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin'
|
||||
import useVuelidate from '@vuelidate/core'
|
||||
import { required } from '@vuelidate/validators'
|
||||
import errorUtils from '@/plugins/lib@auth/_utils/error.utils'
|
||||
import tmUtils from '@/plugins/tm@_utils/tm.utils'
|
||||
import { mapGetters } from 'vuex'
|
||||
import AutocompleteMixin from '@/plugins/tm@_mixins/autocomplete.mixin'
|
||||
import modalMixin from '@/plugins/tm@modal/_mixins/modal.mixin'
|
||||
|
||||
const atLeastOne = (value) => value.length
|
||||
|
||||
export default {
|
||||
mixins: [AutocompleteMixin],
|
||||
mixins: [AutocompleteMixin, modalMixin],
|
||||
emits: ['close', 'update'],
|
||||
|
||||
data() {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<td>{{ subtask.project_code }}</td>
|
||||
<td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</td>
|
||||
<td>{{ subtask.duration }} h</td>
|
||||
<td>{{ subtask.duration - subtask.spent_time }} h</td>
|
||||
<td>{{ (subtask.duration - subtask.spent_time).toFixed(2) }} h</td>
|
||||
<td class="task-action">
|
||||
<div class="d-flex justify-start">
|
||||
<img class="pencil-icon" :src="require('@/plugins/app/_img/icons/eye.svg')" alt="pencil-icon" @click.stop="editTask(subtask, false)">
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
<tr>
|
||||
<th class="text-left">Kód projektu</th>
|
||||
<th class="text-left">Názov</th>
|
||||
<th class="text-left">Deadline</th>
|
||||
<th class="text-left">Trvanie</th>
|
||||
<th class="text-left">Akcia</th>
|
||||
</tr>
|
||||
@@ -14,6 +15,7 @@
|
||||
|
||||
<td>{{ subtask.project_code }}</td>
|
||||
<td>{{ subtask.title ?? subtask.master_task?.name ?? subtask.master_task }}</td>
|
||||
<td>{{ getDeadline(subtask) }}</td>
|
||||
<td>{{ subtask.spent_time }} h</td>
|
||||
<td class="task-action">
|
||||
<div class="d-flex justify-start">
|
||||
@@ -28,6 +30,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import moment from 'moment'
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
subtasks: {
|
||||
@@ -36,6 +41,10 @@ export default {
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
...mapGetters('tm', ['mastertasks'])
|
||||
},
|
||||
|
||||
methods: {
|
||||
editTask(subtask, editMode) {
|
||||
this.$events.emit('show-subtask-modal', {subtask, editMode})
|
||||
@@ -43,6 +52,13 @@ export default {
|
||||
|
||||
deleteTask(subtask) {
|
||||
this.$events.emit('show-delete-task-modal', {subtask})
|
||||
},
|
||||
|
||||
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