Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Release 2020/12/15 (v1.1.4) - Filter Update#290

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
luizrrodrigues merged 10 commits intomasterfromdevelop
Dec 15, 2020
Merged
Show file tree
Hide file tree
Changes fromall 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
2 changes: 1 addition & 1 deletion.circleci/config.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -28,7 +28,7 @@ jobs:
- attach_workspace:
at: .
- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: npm publish
- run: npm publish --tag test-release
# dont change anything
workflows:
version: 2
Expand Down
2 changes: 1 addition & 1 deletionpackage.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -31,7 +31,7 @@
"lint:js": "./node_modules/.bin/eslint --ext .js,.jsx .",
"test": "npm run lint && npm run jest"
},
"version": "1.1.3",
"version": "1.1.4",
"dependencies": {
"auth0-js": "^6.8.4",
"config": "^3.2.0",
Expand Down
3 changes: 2 additions & 1 deletionsrc/services/challenges.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -174,7 +174,8 @@ class ChallengesService {
filter,
) => {
let res = {};
if (_.some(filter.frontFilter.tracks, val => val)) {
if (_.some(filter.frontFilter.tracks, val => val)
&& !_.isEqual(filter.frontFilter.types, [])) {
const query = getFilterUrl(filter.backendFilter, filter.frontFilter);
const url = `${endpoint}?${query}`;
res = await this.private.apiV5.get(url).then(checkErrorV5);
Expand Down
20 changes: 11 additions & 9 deletionssrc/utils/challenge/filter.js
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -106,8 +106,8 @@ function filterByRegistrationOpen(challenge, state) {
* @return {Boolean} True if opp satifies the filter
*/
function filterByReviewOpportunityType(opp, state) {
if (!state.reviewOpportunityType) returntrue;
return opp.type === state.reviewOpportunityType;
if (state.reviewOpportunityTypes.length === 0) returnfalse;
returnstate.reviewOpportunityTypes.includes(opp.type);
}

function filterByStartDate(challenge, state) {
Expand DownExpand Up@@ -158,10 +158,10 @@ function filterByEvents(challenge, state) {
}

function filterByText(challenge, state) {
if (!state.name) return true;
if (!state.search) return true;
const str = `${challenge.name} ${challenge.tags} ${challenge.platforms} ${challenge.tags}`
.toLowerCase();
return str.includes(state.name.toLowerCase());
return str.includes(state.search.toLowerCase());
}

function filterByTrack(challenge, state) {
Expand DownExpand Up@@ -447,14 +447,16 @@ export function setEndDate(state, date) {
/**
* Clones the state and sets the review opportunity type.
* @param {Object} state
* @param {Array}reviewOpportunityType Possible values found in utils/tc REVIEW_OPPORTUNITY_TYPES
* @param {Array}reviewOpportunityTypes Possible values found in utils/tc REVIEW_OPPORTUNITY_TYPES
* @return {Object}
*/
export function setReviewOpportunityType(state, reviewOpportunityType) {
if (reviewOpportunityType) return { ...state, reviewOpportunityType };
if (!state.reviewOpportunityType) return state;
export function setReviewOpportunityType(state, reviewOpportunityTypes) {
if (reviewOpportunityTypes && reviewOpportunityTypes.length) {
return { ...state, reviewOpportunityTypes };
}
if (!state.reviewOpportunityTypes) return state;
const res = _.clone(state);
delete res.reviewOpportunityType;
delete res.reviewOpportunityTypes;
return res;
}

Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp