This is the codeAbility Sharing Platform! Learn more about the codeAbility Sharing Platform.

Skip to content
Snippets Groups Projects
Commit 091c05c3 authored by Daniel Rainer's avatar Daniel Rainer
Browse files

Fix language filter

parent c40df0f4
Branches
3 merge requests!91Bringing JHipster7.6.0 to production,!88Integrating Update to JHipster 7.6.0 back to Development,!85Fix language filter
import { MetadataSearchInput } from 'app/shared/model/search/metadata-search-input.model';
import { ILanguages } from 'app/shared/model/exercise.model';
import { MetadataSearchInput } from 'app/shared/model/search/metadata-search-input.model';
export class SearchInput {
public fulltextQuery: string;
......@@ -23,9 +23,12 @@ export class SearchInput {
this.metadata.parentId = value.parentId;
this.metadata.naturalLanguage = [];
for(const eType of Object.values(ILanguages)) {
Object.keys(ILanguages).forEach(typeName => {
if (value[typeName]) {
const eType = ILanguages[typeName as keyof typeof ILanguages];
this.metadata.naturalLanguage.push(eType);
}
}
});
this.metadata.learningResourceType = '';
}
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment