|
18 | 18 | * endDate {Number|String} - Permits only those challenges with submission
|
19 | 19 | * deadline before this date.
|
20 | 20 | *
|
21 |
| - * groupIds {Array} - Permits only the challenges belonging to at least one |
| 21 | + * groups {Array} - Permits only the challenges belonging to at least one |
22 | 22 | * of the groups which IDs are presented as keys in this object.
|
23 | 23 | *
|
24 | 24 | * or {Object[]} - All other filter fields applied to the challenge with AND
|
@@ -71,8 +71,8 @@ import { COMPETITION_TRACKS, REVIEW_OPPORTUNITY_TYPES } from '../tc';
|
71 | 71 | */
|
72 | 72 |
|
73 | 73 | function filterByGroupIds(challenge, state) {
|
74 |
| - if (!state.groupIds) return true; |
75 |
| - return state.groupIds.some(id => challenge.groups[id]); |
| 74 | + if (!state.groups) return true; |
| 75 | + return state.groups.some(id => challenge.groups[id]); |
76 | 76 | }
|
77 | 77 |
|
78 | 78 | function filterByRegistrationOpen(challenge, state) {
|
@@ -343,7 +343,7 @@ export function combine(...filters) {
|
343 | 343 | const res = {};
|
344 | 344 | filters.forEach((filter) => {
|
345 | 345 | combineEndDate(res, filter);
|
346 |
| - combineArrayRules(res, filter, 'groupIds'); |
| 346 | + combineArrayRules(res, filter, 'groups'); |
347 | 347 | /* TODO: The registrationOpen rule is just ignored for now. */
|
348 | 348 | combineStartDate(res, filter);
|
349 | 349 | combineArrayRules(res, filter, 'or', true);
|
@@ -382,7 +382,7 @@ export function mapToBackend(filter) {
|
382 | 382 | if (filter.or) return {};
|
383 | 383 |
|
384 | 384 | const res = {};
|
385 |
| - if (filter.groupIds) res.groups = filter.groupIds; |
| 385 | + if (filter.groups) res.groups = filter.groups; |
386 | 386 |
|
387 | 387 | /* NOTE: Right now the frontend challenge filter by tag works different,
|
388 | 388 | * it looks for matches in the challenge name OR in the techs / platforms. */
|
|
0 commit comments