mirror of
https://github.com/wekan/wekan.git
synced 2026-11-24 09:59:47 -05:00
Build the Table card query from the active board Filter and an immutable board and archive scope, while retaining the view-specific text search. Thanks to rmb82 and xet7 ! Fixes #6629,
12 lines
437 B
JavaScript
12 lines
437 B
JavaScript
'use strict';
|
|
|
|
// Pure selector builder for the per-board Table view. The active Filter owns a
|
|
// top-level $or, so always combine it with the board boundary through $and.
|
|
function tableViewCardsSelector(boardId, filterSelector) {
|
|
const base = { boardId, archived: false };
|
|
if (!filterSelector || Object.keys(filterSelector).length === 0) return base;
|
|
return { $and: [filterSelector, base] };
|
|
}
|
|
|
|
export { tableViewCardsSelector };
|