diff --git a/src/app/client/projects/desktop/src/app/modules/offline/components/search/search.component.ts b/src/app/client/projects/desktop/src/app/modules/offline/components/search/search.component.ts index 077a3786d346ef737cb2d2bc307ba574e87d6373..82fbdfc2a905afce910444b1fb895f39588dc90c 100644 --- a/src/app/client/projects/desktop/src/app/modules/offline/components/search/search.component.ts +++ b/src/app/client/projects/desktop/src/app/modules/offline/components/search/search.component.ts @@ -247,7 +247,7 @@ export class SearchComponent implements OnInit, OnDestroy { facets: this.facets, }; - option.filters['contentType'] = filters.contentType || ['Collection', 'TextBook', 'LessonPlan', 'Resource']; + option.filters['contentType'] = filters.contentType || this.configService.appConfig.CommonSearch.contentType; if (manipulatedData.filters) { option['softConstraints'] = _.get(manipulatedData, 'softConstraints'); } diff --git a/src/app/client/src/app/modules/public/module/explore/components/explore-content/explore-content.component.ts b/src/app/client/src/app/modules/public/module/explore/components/explore-content/explore-content.component.ts index f8762fa475577cb0ad4fd6e92fe418706e070ee5..0c4d5372dd26d2ce565c4d9e5665b9fe486f8720 100644 --- a/src/app/client/src/app/modules/public/module/explore/components/explore-content/explore-content.component.ts +++ b/src/app/client/src/app/modules/public/module/explore/components/explore-content/explore-content.component.ts @@ -137,7 +137,7 @@ export class ExploreContentComponent implements OnInit, OnDestroy, AfterViewInit params: this.configService.appConfig.ExplorePage.contentApiQueryParams }; option.filters.contentType = filters.contentType || - ['Collection', 'TextBook', 'LessonPlan', 'Resource']; + this.configService.appConfig.CommonSearch.contentType; if (manipulatedData.filters) { option['softConstraints'] = _.get(manipulatedData, 'softConstraints'); } diff --git a/src/app/client/src/app/modules/search/components/home-search/home-search.component.ts b/src/app/client/src/app/modules/search/components/home-search/home-search.component.ts index 72cb87f3832ed1372241676a541147b40882ab15..0d3b4159ec0637ab64935ba7bb5a2898ff037cdd 100644 --- a/src/app/client/src/app/modules/search/components/home-search/home-search.component.ts +++ b/src/app/client/src/app/modules/search/components/home-search/home-search.component.ts @@ -90,7 +90,7 @@ export class HomeSearchComponent implements OnInit, OnDestroy, AfterViewInit { private fetchContents() { let filters = _.pickBy(this.queryParams, (value: Array<string> | string) => value && value.length); filters = _.omit(filters, ['key', 'sort_by', 'sortType']); - filters.contentType = filters.contentType || ['Collection', 'TextBook', 'LessonPlan', 'Resource', 'Course']; + filters.contentType = filters.contentType || ['Course', ...this.configService.appConfig.CommonSearch.contentType]; const option = { filters: filters, limit: this.configService.appConfig.SEARCH.PAGE_LIMIT, diff --git a/src/app/client/src/app/modules/search/components/library-search/library-search.component.ts b/src/app/client/src/app/modules/search/components/library-search/library-search.component.ts index 6af85b62c6c97b500a9aa48c67f2878afab9969c..84e635dc4c1ab2acde3704e397639bdac15b4967 100644 --- a/src/app/client/src/app/modules/search/components/library-search/library-search.component.ts +++ b/src/app/client/src/app/modules/search/components/library-search/library-search.component.ts @@ -116,7 +116,7 @@ export class LibrarySearchComponent implements OnInit, OnDestroy, AfterViewInit params: this.configService.appConfig.Library.contentApiQueryParams }; option.filters.contentType = filters.contentType || - ['Collection', 'TextBook', 'LessonPlan', 'Resource']; + this.configService.appConfig.CommonSearch.contentType; if (_.get(manipulatedData, 'filters')) { option['softConstraints'] = _.get(manipulatedData, 'softConstraints'); } diff --git a/src/app/client/src/app/modules/shared/services/config/app.config.json b/src/app/client/src/app/modules/shared/services/config/app.config.json index f532e9446e3e5cd641b67e1aa25106fef4a287db..29b29e65bf48e18c08d7730c6a721ac6007becfc 100644 --- a/src/app/client/src/app/modules/shared/services/config/app.config.json +++ b/src/app/client/src/app/modules/shared/services/config/app.config.json @@ -2,6 +2,18 @@ "UrlLinks": { "downloadDikshaApp": "https://play.google.com/store/apps/details?id=in.gov.diksha.app" }, + "CommonSearch": { + "contentType": [ + "Collection", + "TextBook", + "LessonPlan", + "Resource", + "SelfAssess", + "PracticeResource", + "LearningOutcomeDefinition", + "ExplanationResource" + ] + }, "Home": { "contentApiQueryParams": { "orgdetails": "orgName,email" @@ -608,7 +620,7 @@ "ribbon.right.name": "contentType", "ribbon.left.image": "badgeAssertions[0].badgeClassImage" } - }, + }, "TELEMETRY": { "MAX_BATCH_SIZE": 10, "VERSION": "1.8.0",