Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 4 additions & 7 deletions src/store/card.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

const apiClient = new CardApi()

export default function cardModuleFactory() {

Check warning on line 12 in src/store/card.js

View workflow job for this annotation

GitHub Actions / NPM lint

Missing JSDoc comment
return {
state: {
cards: [],
Expand All @@ -26,7 +26,6 @@
return false
}
let allTagsMatch = true
let allUsersMatch = true

if (tags.length > 0) {
tags.forEach((tag) => {
Expand All @@ -40,12 +39,10 @@
}

if (users.length > 0) {
users.forEach((user) => {
if (!card?.assignedUsers || card.assignedUsers.findIndex((u) => u.participant.uid === user) === -1) {
allUsersMatch = false
}
})
if (!allUsersMatch) {
const anyUserMatch = !card?.assignedUsers
? false
: users.some((user) => card.assignedUsers.findIndex((u) => u.participant.uid === user) !== -1)
if (!anyUserMatch) {
return false
}
}
Expand Down
Loading