mirror of
https://bitbucket.org/studiotem/jandl-taskmanager-app.git
synced 2026-10-21 22:39:34 +00:00
[Projects] Added assigned by filter WIP
This commit is contained in:
1 parent
a980015565
commit
cc3d3b116d
4 files changed
+53
-30
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.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" />
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in new issue
Block a user