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
fafc499488
7 files changed
+77
-35
No files matched your search
@@ -5,6 +5,8 @@
|
|||||||
<v-select v-model="filter.selectedTeam" class="subheader-input" :items="[null, ...teams]" label="Tím" variant="outlined" item-title="name" item-value="id" />
|
<v-select v-model="filter.selectedTeam" class="subheader-input" :items="[null, ...teams]" label="Tím" variant="outlined" item-title="name" item-value="id" />
|
||||||
|
|
||||||
<v-select v-model="filter.selectedEmployee" class="subheader-input" :items="[null, ...enrichedEmployees]" label="Zamestnanec" variant="outlined" item-title="_fullName" item-value="id" />
|
<v-select v-model="filter.selectedEmployee" class="subheader-input" :items="[null, ...enrichedEmployees]" label="Zamestnanec" variant="outlined" item-title="_fullName" item-value="id" />
|
||||||
|
|
||||||
|
<v-select v-model="filter.selectedAssignedBy" class="subheader-input" :items="[null, ...enrichedEmployees]" label="Vytvoril" variant="outlined" item-title="_fullName" item-value="id" />
|
||||||
|
|
||||||
<v-select v-model="filter.selectedMonth" class="subheader-input" :items="months" label="Mesiac" variant="outlined" />
|
<v-select v-model="filter.selectedMonth" class="subheader-input" :items="months" label="Mesiac" variant="outlined" />
|
||||||
|
|
||||||
@@ -16,26 +18,11 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapGetters } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
emits: ['filterChanged'],
|
emits: ['filterChanged'],
|
||||||
|
|
||||||
props: {
|
|
||||||
projects: {
|
|
||||||
type: Array,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
|
|
||||||
teams: {
|
|
||||||
type: Array,
|
|
||||||
required: true
|
|
||||||
},
|
|
||||||
|
|
||||||
employees: {
|
|
||||||
type: Array,
|
|
||||||
required: true
|
|
||||||
}
|
|
||||||
},
|
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
months: [
|
months: [
|
||||||
@@ -57,6 +44,7 @@ export default {
|
|||||||
selectedProject: null,
|
selectedProject: null,
|
||||||
selectedTeam: null,
|
selectedTeam: null,
|
||||||
selectedEmployee: null,
|
selectedEmployee: null,
|
||||||
|
selectedAssignedBy: null,
|
||||||
selectedMonth: new Date().getMonth(),
|
selectedMonth: new Date().getMonth(),
|
||||||
showFinishedTasks: false
|
showFinishedTasks: false
|
||||||
}
|
}
|
||||||
@@ -64,14 +52,11 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
enrichedEmployees() {
|
...mapGetters('tm', [
|
||||||
const employees = this.employees
|
'teams',
|
||||||
|
'projects',
|
||||||
return employees.map(employee => {
|
'enrichedEmployees'
|
||||||
employee._fullName = `${employee.name} ${employee.surname}`
|
])
|
||||||
return employee
|
|
||||||
})
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
watch: {
|
watch: {
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<W-loadable :content="filteredEvents" empty-message="Nepodarilo sa nacitat data!">
|
<W-loadable :content="filteredEvents" empty-message="Nepodarilo sa nacitat data!">
|
||||||
<A-project-filter :projects="projects" :teams="teams" :employees="employees" @filterChanged="onFilterChanged" />
|
<A-project-filter @filterChanged="onFilterChanged" />
|
||||||
<A-project-calendar :events="filteredEvents" :month="filter.selectedMonth" @open-detail="openMasterTaskModal" />
|
<A-project-calendar :events="filteredEvents" :month="filter.selectedMonth" @open-detail="openMasterTaskModal" />
|
||||||
</W-loadable>
|
</W-loadable>
|
||||||
</template>
|
</template>
|
||||||
@@ -26,10 +26,7 @@ export default {
|
|||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
...mapGetters('tm', [
|
...mapGetters('tm', [
|
||||||
'employees',
|
'mastertasks'
|
||||||
'mastertasks',
|
|
||||||
'teams',
|
|
||||||
'projects'
|
|
||||||
]),
|
]),
|
||||||
|
|
||||||
filteredEvents() {
|
filteredEvents() {
|
||||||
|
|||||||
@@ -0,0 +1,38 @@
|
|||||||
|
<template>
|
||||||
|
<v-row no-gutters class="align-center">
|
||||||
|
<v-col cols="5">
|
||||||
|
<v-sheet class="py-3">
|
||||||
|
<div class="d-flex align-center">
|
||||||
|
<v-icon icon="mdi-account-star-outline" size="large"></v-icon>
|
||||||
|
<p class="mx-3">Vytvoril</p>
|
||||||
|
</div>
|
||||||
|
</v-sheet>
|
||||||
|
</v-col>
|
||||||
|
|
||||||
|
<v-col cols="7">
|
||||||
|
<v-sheet class="py-3 d-flex align-center">
|
||||||
|
<p class="employee-selected-avatar d-flex justify-center align-center">
|
||||||
|
{{ employee.name.charAt(0) + employee.surname.charAt(0) }}
|
||||||
|
</p>
|
||||||
|
<p class="ml-2" v-html="`${employee.name} ${employee.surname}`" />
|
||||||
|
</v-sheet>
|
||||||
|
</v-col>
|
||||||
|
</v-row>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
employee: {
|
||||||
|
type: Object,
|
||||||
|
// required: true,
|
||||||
|
|
||||||
|
// TODO Remove
|
||||||
|
default: () => ({
|
||||||
|
name: 'Zachariach',
|
||||||
|
surname: 'VonRunden (MOCK)'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,16 +1,26 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="px-5 py-5 border-bottom">
|
<div class="px-5 py-5 border-bottom" v-if="description" >
|
||||||
<p>Popis zadania</p>
|
<p>Popis zadania</p>
|
||||||
<section v-html="description" class="description-detail px-2 py-2 w-100 rounded mt-2" />
|
<section v-html="description" class="description-detail px-2 py-2 w-100 rounded mt-2" />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="px-5 py-5 border-bottom" v-if="masterTaskDescription">
|
||||||
|
<p>Popis mastertasku</p>
|
||||||
|
<section v-html="masterTaskDescription" class="description-detail px-2 py-2 w-100 rounded mt-2" />
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
props: {
|
props: {
|
||||||
description: {
|
description: {
|
||||||
type: String,
|
type: String || null,
|
||||||
default: () => ''
|
default: () => null
|
||||||
|
},
|
||||||
|
|
||||||
|
masterTaskDescription: {
|
||||||
|
type: String || null,
|
||||||
|
default: () => null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -117,9 +117,14 @@ export default {
|
|||||||
async _update(task) {
|
async _update(task) {
|
||||||
try {
|
try {
|
||||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${task.id}`, task)
|
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${task.id}`, task)
|
||||||
this.$store.commit('tm/update_subtask', subtask)
|
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
|
this.$store.commit('tm/update_subtask', subtask)
|
||||||
this.$events.emit('on-subtask-edited', subtask)
|
this.$events.emit('on-subtask-edited', subtask)
|
||||||
|
|
||||||
|
this.$store.dispatch('tm/loadMastertasks')
|
||||||
|
this.$store.dispatch('tm/loadUnscheduledSubtasks')
|
||||||
|
this.$store.dispatch('tm/loadOngoingSubtasks')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error.message || error)
|
this.$toast.error(error.message || error)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -126,6 +126,10 @@ export default {
|
|||||||
|
|
||||||
this.closeModal()
|
this.closeModal()
|
||||||
this.$events.emit('on-subtask-edited', subtask)
|
this.$events.emit('on-subtask-edited', subtask)
|
||||||
|
|
||||||
|
this.$store.dispatch('tm/loadMastertasks')
|
||||||
|
this.$store.dispatch('tm/loadUnscheduledSubtasks')
|
||||||
|
this.$store.dispatch('tm/loadOngoingSubtasks')
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
this.$toast.error(error.message || error)
|
this.$toast.error(error.message || error)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,11 +2,12 @@
|
|||||||
<A-mastertask-name :name="task.master_task?.name || task.master_task" :id="task.master_task.id" :color="task.master_task.color" @close-modal="$emit('close-modal')" />
|
<A-mastertask-name :name="task.master_task?.name || task.master_task" :id="task.master_task.id" :color="task.master_task.color" @close-modal="$emit('close-modal')" />
|
||||||
<A-mastertask-status :status="task.is_finished" />
|
<A-mastertask-status :status="task.is_finished" />
|
||||||
<A-task-timeblocks :timeblocks="task.timeblocks" :task="task" />
|
<A-task-timeblocks :timeblocks="task.timeblocks" :task="task" />
|
||||||
|
<A-task-assigned-by :employee="task.assigned_by" />
|
||||||
<A-task-assigned-employee :employee="task.employee" />
|
<A-task-assigned-employee :employee="task.employee" />
|
||||||
<A-task-planned-time :hours="task.duration" />
|
<A-task-planned-time :hours="task.duration" />
|
||||||
<A-task-remaining-time :hours="task.duration - task.spent_time" />
|
<A-task-remaining-time :hours="task.duration - task.spent_time" />
|
||||||
<A-task-spent-time :hours="task.spent_time" :task="task" />
|
<A-task-spent-time :hours="task.spent_time" :task="task" />
|
||||||
<A-task-description :description="task.description" />
|
<A-task-description :description="task.description" :master-task-description="task.master_task_description" />
|
||||||
<Z-files :files="task.files" />
|
<Z-files :files="task.files" />
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@@ -14,6 +15,7 @@
|
|||||||
import AMastertaskName from './_components/a-mastertask-name.vue'
|
import AMastertaskName from './_components/a-mastertask-name.vue'
|
||||||
import AMastertaskStatus from './_components/a-mastertask-status.vue'
|
import AMastertaskStatus from './_components/a-mastertask-status.vue'
|
||||||
import ATaskTimeblocks from './_components/a-task-timeblocks.vue'
|
import ATaskTimeblocks from './_components/a-task-timeblocks.vue'
|
||||||
|
import ATaskAssignedBy from './_components/a-task-assigned-by.vue'
|
||||||
import ATaskAssignedEmployee from './_components/a-task-assigned-employee.vue'
|
import ATaskAssignedEmployee from './_components/a-task-assigned-employee.vue'
|
||||||
import ATaskPlannedTime from './_components/a-task-planned-time.vue'
|
import ATaskPlannedTime from './_components/a-task-planned-time.vue'
|
||||||
import ATaskSpentTime from './_components/a-task-spent-time.vue'
|
import ATaskSpentTime from './_components/a-task-spent-time.vue'
|
||||||
@@ -29,6 +31,7 @@ export default {
|
|||||||
AMastertaskName,
|
AMastertaskName,
|
||||||
AMastertaskStatus,
|
AMastertaskStatus,
|
||||||
ATaskTimeblocks,
|
ATaskTimeblocks,
|
||||||
|
ATaskAssignedBy,
|
||||||
ATaskAssignedEmployee,
|
ATaskAssignedEmployee,
|
||||||
ATaskPlannedTime,
|
ATaskPlannedTime,
|
||||||
ATaskSpentTime,
|
ATaskSpentTime,
|
||||||
|
|||||||
Reference in new issue
Block a user