diff --git a/src/app/client/src/app/modules/content-search/components/search-filter/search-filter.component.ts b/src/app/client/src/app/modules/content-search/components/search-filter/search-filter.component.ts
index 767e3d09215..88f867d1fb3 100644
--- a/src/app/client/src/app/modules/content-search/components/search-filter/search-filter.component.ts
+++ b/src/app/client/src/app/modules/content-search/components/search-filter/search-filter.component.ts
@@ -143,6 +143,8 @@ export class SearchFilterComponent implements OnInit, OnDestroy {
switchMap(queryParams => {
this.filterChange.emit({ status: 'FETCHING' });
let boardName = _.get(queryParams, 'board[0]') || _.get(this.boards, '[0]');
+ //117337 - removed hardcoded cbse/ncert
+ console.log(boardName,'boardname')
boardName = boardName === 'CBSE/NCERT' ? 'CBSE' : boardName;
return zip(this.getFramework({ boardName }), this.getAudienceTypeFormConfig())
.pipe(map(([filters, audienceTypeFilter]: [object, object]) => ({ ...filters, audience: audienceTypeFilter })));
@@ -235,7 +237,9 @@ export class SearchFilterComponent implements OnInit, OnDestroy {
const selectedOption = _.find(this.boards, { name: _.get(this.queryFilters, 'board[0]') }) ||
_.find(this.boards, { name: _.get(this.defaultFilters, 'board[0]') }) || this.boards[0];
this.selectedBoard = { label: this.optionLabel.Board, value: 'board', selectedOption: _.get(selectedOption, 'name') };
+ //117337 - removed hardcoded cbse/ncert
this.selectedBoard.selectedOption = this.selectedBoard.selectedOption === 'CBSE' ? 'CBSE/NCERT' : this.selectedBoard.selectedOption;
+ // this.selectedBoard.selectedOption = this.selectedBoard.selectedOption;
this.selectedOption = this.selectedBoard;
}
}
@@ -269,6 +273,7 @@ export class SearchFilterComponent implements OnInit, OnDestroy {
this.selectedNgModels = {};
this.allValues = {};
_.forEach(filters, (filterValues: { name: any }[], filterKey: string) => {
+ //117337 - removed hardcode cbse/ncert
if (filterKey === 'board') {
const boardName = filterValues.find((board) => board.name === 'CBSE');
boardName && (boardName.name = 'CBSE/NCERT');
diff --git a/src/app/client/src/app/modules/core/components/content-type/content-type.component.ts b/src/app/client/src/app/modules/core/components/content-type/content-type.component.ts
index f2880a72bb8..b1608ca9500 100644
--- a/src/app/client/src/app/modules/core/components/content-type/content-type.component.ts
+++ b/src/app/client/src/app/modules/core/components/content-type/content-type.component.ts
@@ -101,6 +101,7 @@ export class ContentTypeComponent implements OnInit, OnDestroy {
let pathname = this.userService._slug;
if( pathname && pathname==="dikshacustodian" && this.userService._userProfile.framework.board){
let board = this.userService._userProfile.framework.board[0];
+ //117337 - removed hardcoded cbse/ncert
if(board==="CBSE/NCERT"){
board="CBSE";
}
@@ -108,6 +109,7 @@ export class ContentTypeComponent implements OnInit, OnDestroy {
}
else if( !pathname && userPreference.framework.board){
let board = userPreference.framework.board[0];
+ //117337 - removed hardcoded cbse/ncert
if(board==="CBSE/NCERT"){
board="CBSE";
}
@@ -139,6 +141,11 @@ export class ContentTypeComponent implements OnInit, OnDestroy {
!data.isLoginMandatory ?
this.router.navigate([this.exploreNcert ? '/exploren/1' : data.anonumousUserRoute.route],
{ queryParams: { ...params,board: 'CBSE/NCERT',selectedTab: data.anonumousUserRoute.queryParam } }) : window.location.href = this.exploreNcert ? '/exploren' : data.loggedInUserRoute.route;
+
+ // !data.isLoginMandatory ?
+ // this.router.navigate([this.exploreNcert ? '/exploren/1' : data.anonumousUserRoute.route],
+ // { queryParams: { ...params,board: 'CBSE',selectedTab: data.anonumousUserRoute.queryParam } }) : window.location.href = this.exploreNcert ? '/exploren' : data.loggedInUserRoute.route;
+
} else if(((params.board && params.board[0] && params.board[0] != undefined) && params.board[0] == 'ncert')){
!data.isLoginMandatory ?
this.router.navigate([this.exploreNcert ? '/exploren/1' : data.anonumousUserRoute.route],
diff --git a/src/app/client/src/app/modules/core/services/search/search.service.ts b/src/app/client/src/app/modules/core/services/search/search.service.ts
index 85114c9a5e3..bbbae40a85c 100644
--- a/src/app/client/src/app/modules/core/services/search/search.service.ts
+++ b/src/app/client/src/app/modules/core/services/search/search.service.ts
@@ -508,7 +508,9 @@ export class SearchService {
facet['placeholder'] = this.resourceService.frmelmnts.lbl.selectBoard;
// Replacing cbse value with cbse/ncert
_.map(facet['values'], val => {
- if (_.toLower(val.name) === 'cbse') { val.name = 'CBSE/NCERT'; }
+ //117337 - removed hardcoded cbse/ncert
+ if (_.toLower(val.name) === 'cbse') { val.name = 'CBSE/NCERT'; }
+ if (_.toLower(val.name) === 'cbse') { val.name = 'CBSE'; }
});
break;
case 'se_mediums':
diff --git a/src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.html b/src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.html
index e847f07acf4..91ae24c296c 100644
--- a/src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.html
+++ b/src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.html
@@ -69,7 +69,7 @@
{{resourceService?.frmelmnts?.lbl?.boards | transposeTerms: 'frmelmnts.lbl.boards': resourceService?.selectedLang}}:
{{convertToString(userPreference?.framework?.board) | interpolate }}
+ class="font-weight-bold">{{convertToString(userPreference?.framework?.board) | interpolate: 'CBSE': 'CBSE/NCERT'}}
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 e9a99021c70..03d6c029823 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
@@ -201,6 +201,7 @@ export class ExplorePageComponent implements OnInit, OnDestroy, AfterViewInit {
if (this.isUserLoggedIn()) {
this.prepareVisits([]);
}
+ //117337 - removed hardcoded cbse/ncert
if (_.get(params, 'board') && params.board[0] === 'CBSE') {
params.board[0] = 'CBSE/NCERT';
}
@@ -218,6 +219,7 @@ async ngOnInit() {
if (tenant) {
//117337 - removed hardcoded cbse/ncert
const queryParams: Params = { board: tenant['name'] == 'CBSE' ? 'CBSE/NCERT' : tenant['name'],id:tenant['identifier'],selectedTab:selectedTab};
+ // const queryParams: Params = { board: tenant['name'],id:tenant['identifier'],selectedTab:selectedTab};
this.router.navigate(
[],
{
@@ -244,7 +246,9 @@ async ngOnInit() {
// guestUserDetails.framework.id = 'ncert_k-12';
// localStorage.setItem('guestUserDetails', JSON.stringify(guestUserDetails));
} else {
+ //117337 - removed hardcoded cbse/ncert
this.router.navigateByUrl('/explore?board=CBSE/NCERT&gradeLevel=Class 1&gradeLevel=Class 2&&id=ncert_k-12&selectedTab=home');
+ // this.router.navigateByUrl('/explore?board=CBSE&gradeLevel=Class 1&gradeLevel=Class 2&&id=ncert_k-12&selectedTab=home');
}
}
@@ -421,6 +425,7 @@ async ngOnInit() {
//this.cacheService.set('searchFilters', filters, { expires: Date.now() + _cacheTimeout });
this.showLoader = true;
this.selectedFilters = pick(filters, _.get(currentPageData , 'metaData.filters'));
+ //117337 - removed hardcoded cbse/ncert
if (this.selectedFilters && this.selectedFilters['board'] && this.selectedFilters['board'][0] === 'CBSE/NCERT') {
this.selectedFilters['board'][0] = 'CBSE';
}
@@ -509,6 +514,7 @@ async ngOnInit() {
if (((_.get(currentPageData, 'metaData.filters').indexOf(filterValue) !== -1))) {
let param = {};
param[filterValue] = (typeof (params[filterValue]) === "string") ? params[filterValue].split(',') : params[filterValue];
+ //117337 - removed hardcoded cbse/ncert
if (param[filterValue].length === 1 && param[filterValue][0] === 'CBSE/NCERT') {
param[filterValue][0] = "CBSE";
}
@@ -1175,6 +1181,7 @@ async ngOnInit() {
});
const paramValuesInLowerCase = _.mapValues(updatedCategoriesMapping, value => {
+ //117337 - removed hardcoded cbse/ncert
if (_.toLower(value) === 'cbse') { return 'CBSE/NCERT'; }
return Array.isArray(value) ? _.map(value, _.toLower) : _.toLower(value);
});
@@ -1397,6 +1404,7 @@ async ngOnInit() {
let pathSegment;
if( this.userPreference.framework.board){
let board = this.userPreference.framework.board[0];
+ //117337 - removed hardcoded cbse/ncert
if(board==="CBSE/NCERT"){
board="CBSE";
}
diff --git a/src/app/client/src/app/modules/player-helper/components/content-actions/content-actions.component.ts b/src/app/client/src/app/modules/player-helper/components/content-actions/content-actions.component.ts
index f1215de908a..9cd8872a777 100644
--- a/src/app/client/src/app/modules/player-helper/components/content-actions/content-actions.component.ts
+++ b/src/app/client/src/app/modules/player-helper/components/content-actions/content-actions.component.ts
@@ -66,7 +66,9 @@ export class ContentActionsComponent implements OnInit, OnChanges, OnDestroy {
this.isDesktopApp = this.utilService.isDesktopApp;
// Replacing cbse/ncert value with cbse
if (_.toLower(_.get(this.contentData, 'board')) === 'cbse') {
+ //117337 - removed hardcoded cbse/ncert
this.contentData.board = 'CBSE/NCERT';
+ // this.contentData.board = 'CBSE';
}
const isVideoMimetype = _.includes(['video/mp4', 'video/webm'], _.get(this.contentData, 'mimeType'));
this.activatedRoute.params.subscribe((params) => {
diff --git a/src/app/client/src/app/modules/public/module/course/components/explore-course/explore-course.component.ts b/src/app/client/src/app/modules/public/module/course/components/explore-course/explore-course.component.ts
index 06d0149d4de..bfec1350af7 100644
--- a/src/app/client/src/app/modules/public/module/course/components/explore-course/explore-course.component.ts
+++ b/src/app/client/src/app/modules/public/module/course/components/explore-course/explore-course.component.ts
@@ -183,6 +183,7 @@ export class ExploreCourseComponent implements OnInit, OnDestroy, AfterViewInit
filters.mimeType = _.get(mimeType, 'values');
// Replacing cbse/ncert value with cbse
+ //117337 - removed hardcoded cbse/ncert
if (_.toLower(_.get(filters, 'board[0]')) === 'cbse/ncert' || _.toLower(_.get(filters, 'board')) === 'cbse/ncert') {
filters.board = ['cbse'];
}
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 20af9b0d1c1..9530a0617aa 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
@@ -288,11 +288,16 @@ export class ExploreContentComponent implements OnInit, OnDestroy, AfterViewInit
option.params.framework = this.frameworkId;
}
// Replacing cbse/ncert value with cbse
+ //117337 - removed hardcoded cbse/ncert
if (_.toLower(_.get(filters, 'board[0]')) === 'cbse/ncert' || _.toLower(_.get(filters, 'board')) === 'cbse/ncert') {
filters.board = ['cbse'];
}
const cbseNcertExists = [_.get(filters, 'board[0]'), _.get(filters, 'board'), _.get(filters, 'se_boards[0]'), _.get(filters, 'se_boards')].some(board => _.toLower(board) === 'cbse/ncert');
- if (cbseNcertExists) {
+ // if (_.toLower(_.get(filters, 'board[0]')) === 'cbse' || _.toLower(_.get(filters, 'board')) === 'cbse') {
+ // filters.board = ['cbse'];
+ // }
+ // const cbseNcertExists = [_.get(filters, 'board[0]'), _.get(filters, 'board'), _.get(filters, 'se_boards[0]'), _.get(filters, 'se_boards')].some(board => _.toLower(board) === 'cbse');
+ if (cbseNcertExists) {
option.filters.se_boards = ['CBSE'];
} else {
if(pathname != 'explore' && this.queryParams.selectedTab ==="all"){
diff --git a/src/app/client/src/app/modules/public/module/guest-profile/components/guest-profile/guest-profile.component.html b/src/app/client/src/app/modules/public/module/guest-profile/components/guest-profile/guest-profile.component.html
index 6d0bf84ebca..f6561c5b740 100644
--- a/src/app/client/src/app/modules/public/module/guest-profile/components/guest-profile/guest-profile.component.html
+++ b/src/app/client/src/app/modules/public/module/guest-profile/components/guest-profile/guest-profile.component.html
@@ -87,8 +87,10 @@