Merge pull request #1926 from nextcloud/enh/unassignedFilter
This commit is contained in:
@@ -76,6 +76,17 @@
|
||||
</div>
|
||||
|
||||
<h3>{{ t('deck', 'Filter by assigned user') }}</h3>
|
||||
<div class="filter--item">
|
||||
<input
|
||||
id="unassigned"
|
||||
v-model="filter.unassigned"
|
||||
type="checkbox"
|
||||
class="checkbox"
|
||||
value="unassigned"
|
||||
@change="setFilter"
|
||||
@click="beforeSetFilter">
|
||||
<label for="unassigned">{{ t('deck', 'Unassigned') }}</label>
|
||||
</div>
|
||||
<div v-for="user in board.users" :key="user.uid" class="filter--item">
|
||||
<input
|
||||
:id="user.uid"
|
||||
@@ -202,7 +213,7 @@ export default {
|
||||
stack: '',
|
||||
showArchived: false,
|
||||
isAddStackVisible: false,
|
||||
filter: { tags: [], users: [], due: '' },
|
||||
filter: { tags: [], users: [], due: '', unassigned: false },
|
||||
}
|
||||
},
|
||||
|
||||
@@ -246,8 +257,14 @@ export default {
|
||||
this.filter.due = ''
|
||||
this.$store.dispatch('setFilter', { ...this.filter })
|
||||
}
|
||||
if (e.target.value === 'unassigned') {
|
||||
this.filter.users = []
|
||||
}
|
||||
},
|
||||
setFilter() {
|
||||
if (this.filter.users.length > 0) {
|
||||
this.filter.unassigned = false
|
||||
}
|
||||
this.$nextTick(() => this.$store.dispatch('setFilter', { ...this.filter }))
|
||||
},
|
||||
toggleNav() {
|
||||
|
||||
@@ -32,7 +32,7 @@ export default {
|
||||
getters: {
|
||||
cardsByStack: (state, getters, rootState) => (id) => {
|
||||
return state.cards.filter((card) => {
|
||||
const { tags, users, due } = rootState.filter
|
||||
const { tags, users, due, unassigned } = rootState.filter
|
||||
let allTagsMatch = true
|
||||
let allUsersMatch = true
|
||||
|
||||
@@ -58,6 +58,10 @@ export default {
|
||||
}
|
||||
}
|
||||
|
||||
if (unassigned && card.assignedUsers.length > 0) {
|
||||
return false
|
||||
}
|
||||
|
||||
if (due !== '') {
|
||||
const datediffHour = ((new Date(card.duedate) - new Date()) / 3600 / 1000)
|
||||
switch (due) {
|
||||
|
||||
Reference in New Issue
Block a user