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
@@ -6,6 +6,8 @@
|
||||
|
||||
<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" />
|
||||
|
||||
<div class="subheader-input switch">
|
||||
@@ -16,26 +18,11 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters } from 'vuex'
|
||||
|
||||
export default {
|
||||
emits: ['filterChanged'],
|
||||
|
||||
props: {
|
||||
projects: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
|
||||
teams: {
|
||||
type: Array,
|
||||
required: true
|
||||
},
|
||||
|
||||
employees: {
|
||||
type: Array,
|
||||
required: true
|
||||
}
|
||||
},
|
||||
|
||||
data() {
|
||||
return {
|
||||
months: [
|
||||
@@ -57,6 +44,7 @@ export default {
|
||||
selectedProject: null,
|
||||
selectedTeam: null,
|
||||
selectedEmployee: null,
|
||||
selectedAssignedBy: null,
|
||||
selectedMonth: new Date().getMonth(),
|
||||
showFinishedTasks: false
|
||||
}
|
||||
@@ -64,14 +52,11 @@ export default {
|
||||
},
|
||||
|
||||
computed: {
|
||||
enrichedEmployees() {
|
||||
const employees = this.employees
|
||||
|
||||
return employees.map(employee => {
|
||||
employee._fullName = `${employee.name} ${employee.surname}`
|
||||
return employee
|
||||
})
|
||||
}
|
||||
...mapGetters('tm', [
|
||||
'teams',
|
||||
'projects',
|
||||
'enrichedEmployees'
|
||||
])
|
||||
},
|
||||
|
||||
watch: {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<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" />
|
||||
</W-loadable>
|
||||
</template>
|
||||
@@ -26,10 +26,7 @@ export default {
|
||||
|
||||
computed: {
|
||||
...mapGetters('tm', [
|
||||
'employees',
|
||||
'mastertasks',
|
||||
'teams',
|
||||
'projects'
|
||||
'mastertasks'
|
||||
]),
|
||||
|
||||
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>
|
||||
<div class="px-5 py-5 border-bottom">
|
||||
<div class="px-5 py-5 border-bottom" v-if="description" >
|
||||
<p>Popis zadania</p>
|
||||
<section v-html="description" class="description-detail px-2 py-2 w-100 rounded mt-2" />
|
||||
</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>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
description: {
|
||||
type: String,
|
||||
default: () => ''
|
||||
type: String || null,
|
||||
default: () => null
|
||||
},
|
||||
|
||||
masterTaskDescription: {
|
||||
type: String || null,
|
||||
default: () => null
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -117,9 +117,14 @@ export default {
|
||||
async _update(task) {
|
||||
try {
|
||||
const { subtask } = await this.$axios.put_auth(`v1/subtasks/${task.id}`, task)
|
||||
this.$store.commit('tm/update_subtask', subtask)
|
||||
|
||||
this.closeModal()
|
||||
this.$store.commit('tm/update_subtask', 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) {
|
||||
this.$toast.error(error.message || error)
|
||||
}
|
||||
|
||||
@@ -126,6 +126,10 @@ export default {
|
||||
|
||||
this.closeModal()
|
||||
this.$events.emit('on-subtask-edited', subtask)
|
||||
|
||||
this.$store.dispatch('tm/loadMastertasks')
|
||||
this.$store.dispatch('tm/loadUnscheduledSubtasks')
|
||||
this.$store.dispatch('tm/loadOngoingSubtasks')
|
||||
} catch (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-status :status="task.is_finished" />
|
||||
<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-planned-time :hours="task.duration" />
|
||||
<A-task-remaining-time :hours="task.duration - task.spent_time" />
|
||||
<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" />
|
||||
</template>
|
||||
|
||||
@@ -14,6 +15,7 @@
|
||||
import AMastertaskName from './_components/a-mastertask-name.vue'
|
||||
import AMastertaskStatus from './_components/a-mastertask-status.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 ATaskPlannedTime from './_components/a-task-planned-time.vue'
|
||||
import ATaskSpentTime from './_components/a-task-spent-time.vue'
|
||||
@@ -29,6 +31,7 @@ export default {
|
||||
AMastertaskName,
|
||||
AMastertaskStatus,
|
||||
ATaskTimeblocks,
|
||||
ATaskAssignedBy,
|
||||
ATaskAssignedEmployee,
|
||||
ATaskPlannedTime,
|
||||
ATaskSpentTime,
|
||||
|
||||
Reference in new issue
Block a user