Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
uphrh-SunbirdEd-portal-old
Commits
3df2bf69
Unverified
Commit
3df2bf69
authored
2 years ago
by
Rajeev
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #8353 from princegupta1131/ED-211
Ed 211
parents
93a15c8c
99614687
release-5.1.1
filters_5.1.1
gcp_test
release-5.1.0
Tags unavailable
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.ts
+9
-1
...re-page/components/explore-page/explore-page.component.ts
src/app/client/src/app/modules/public/module/explore/components/explore-content/explore-content.component.ts
+7
-0
...e/components/explore-content/explore-content.component.ts
with
16 additions
and
1 deletion
+16
-1
src/app/client/src/app/modules/explore-page/components/explore-page/explore-page.component.ts
+
9
−
1
View file @
3df2bf69
...
@@ -453,6 +453,14 @@ export class ExplorePageComponent implements OnInit, OnDestroy, AfterViewInit {
...
@@ -453,6 +453,14 @@ export class ExplorePageComponent implements OnInit, OnDestroy, AfterViewInit {
request
.
channelId
=
this
.
selectedFilters
[
'
channel
'
];
request
.
channelId
=
this
.
selectedFilters
[
'
channel
'
];
}
}
const
option
=
this
.
searchService
.
getSearchRequest
(
request
,
get
(
filters
,
'
primaryCategory
'
));
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
)
{
if
(
this
.
userService
.
loggedIn
)
{
option
.
filters
[
'
visibility
'
]
=
option
.
filters
[
'
channel
'
]
=
[];
option
.
filters
[
'
visibility
'
]
=
option
.
filters
[
'
channel
'
]
=
[];
}
}
...
@@ -464,7 +472,7 @@ export class ExplorePageComponent implements OnInit, OnDestroy, AfterViewInit {
...
@@ -464,7 +472,7 @@ export class ExplorePageComponent implements OnInit, OnDestroy, AfterViewInit {
this
.
utilService
.
processCourseFacetData
(
_
.
get
(
response
,
'
result
'
),
_
.
get
(
request
,
'
facets
'
))
:
{});
this
.
utilService
.
processCourseFacetData
(
_
.
get
(
response
,
'
result
'
),
_
.
get
(
request
,
'
facets
'
))
:
{});
this
.
searchResponse
=
get
(
response
,
'
result.content
'
);
this
.
searchResponse
=
get
(
response
,
'
result.content
'
);
if
(
_
.
has
(
response
,
'
result.QuestionSet
'
))
{
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
=>
{
const
filteredContents
=
omit
(
groupBy
(
this
.
searchResponse
,
content
=>
{
return
content
[
groupByKey
]
||
content
[
'
subject
'
]
||
'
Others
'
;
return
content
[
groupByKey
]
||
content
[
'
subject
'
]
||
'
Others
'
;
...
...
This diff is collapsed.
Click to expand it.
src/app/client/src/app/modules/public/module/explore/components/explore-content/explore-content.component.ts
+
7
−
0
View file @
3df2bf69
...
@@ -241,6 +241,13 @@ export class ExploreContentComponent implements OnInit, OnDestroy, AfterViewInit
...
@@ -241,6 +241,13 @@ export class ExploreContentComponent implements OnInit, OnDestroy, AfterViewInit
facets
:
this
.
globalSearchFacets
,
facets
:
this
.
globalSearchFacets
,
params
:
this
.
configService
.
appConfig
.
ExplorePage
.
contentApiQueryParams
||
{}
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
)
{
if
(
this
.
queryParams
.
softConstraints
)
{
try
{
try
{
option
.
softConstraints
=
JSON
.
parse
(
this
.
queryParams
.
softConstraints
);
option
.
softConstraints
=
JSON
.
parse
(
this
.
queryParams
.
softConstraints
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets