diff --git a/src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.ts b/src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.ts index 896ac15566b1d63da97ea6ac74e69776c0fa7365..0c115e18d304dde8361d9b25f95050b50c47d250 100644 --- a/src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.ts +++ b/src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.ts @@ -453,6 +453,14 @@ export class ExplorePageComponent implements OnInit, OnDestroy, AfterViewInit { request.channelId = this.selectedFilters['channel']; } const option = this.searchService.getSearchRequest(request, get(filters, 'primaryCategory')); + const params = _.get(this.activatedRoute, 'snapshot.queryParams'); + _.filter(Object.keys(params),filterValue => { + if(((_.get(currentPageData , 'metaData.filters').indexOf(filterValue) !== -1))) + { + option.filters[filterValue] = (typeof(params[filterValue]) === "string" ) ? params[filterValue].split(',') : params[filterValue]; + + } + }); if (this.userService.loggedIn) { option.filters['visibility'] = option.filters['channel'] = []; } @@ -464,7 +472,7 @@ export class ExplorePageComponent implements OnInit, OnDestroy, AfterViewInit { this.utilService.processCourseFacetData(_.get(response, 'result'), _.get(request, 'facets')) : {}); this.searchResponse = get(response, 'result.content'); if (_.has(response, 'result.QuestionSet')) { - this.searchResponse = _.merge(this.searchResponse, _.get(response, 'result.QuestionSet')); + this.searchResponse = _.merge(this.searchResponse, _.get(response, 'result.QuestionSet')); } const filteredContents = omit(groupBy(this.searchResponse, content => { return content[groupByKey] || content['subject'] || 'Others'; 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 80ce9bf397ced0bdb059dee5039acf7d10c8a5ec..3218570acb074cc650107e66b793b53b317a4acc 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 @@ -241,6 +241,13 @@ export class ExploreContentComponent implements OnInit, OnDestroy, AfterViewInit facets: this.globalSearchFacets, params: this.configService.appConfig.ExplorePage.contentApiQueryParams || {} }; + _.filter(Object.keys(this.queryParams),filterValue => { + if(((_.get(this.allTabData , 'search.facets').indexOf(filterValue) !== -1))) + { + option.filters[filterValue] = (typeof(this.queryParams[filterValue]) === "string" ) ? this.queryParams[filterValue].split(',') : this.queryParams[filterValue]; + + } + }); if (this.queryParams.softConstraints) { try { option.softConstraints = JSON.parse(this.queryParams.softConstraints);