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
87ba87d0
Unverified
Commit
87ba87d0
authored
4 years ago
by
Rajeev
Committed by
GitHub
4 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #4420 from itsvick/release-3.0.1
Issue #SB-19651 fix: Hide View all button
parents
d9bf4ee1
c5fe6f5c
master
Dark_theme
SB-25589
SB-28090
aws_fileRead
contributions
dependabot/npm_and_yarn/src/app/client/decode-uri-component-0.2.2
dependabot/npm_and_yarn/src/app/decode-uri-component-0.2.2
dependabot/npm_and_yarn/src/app/express-4.17.3
dependabot/npm_and_yarn/src/app/jsonwebtoken-9.0.0
dependabot/npm_and_yarn/src/desktop/OpenRAP/decode-uri-component-0.2.2
dependabot/npm_and_yarn/src/desktop/OpenRAP/express-4.17.3
dependabot/npm_and_yarn/src/desktop/OpenRAP/jsonwebtoken-9.0.0
dependabot/npm_and_yarn/src/desktop/OpenRAP/qs-6.5.3
dependabot/npm_and_yarn/src/desktop/decode-uri-component-0.2.2
dependabot/npm_and_yarn/src/desktop/express-4.17.3
dependabot/npm_and_yarn/src/desktop/jsonwebtoken-9.0.0
dependabot/npm_and_yarn/src/desktop/qs-6.10.3
filters_5.1.1
gcp
gcp_test
keshavprasadms-patch-1
keshavprasadms-patch-2
release-3.0.1
release-3.0.2
release-3.0.3
release-3.0.4
release-3.0.4-sso
release-3.1.0
release-3.1.1
release-3.1.2
release-3.2.0
release-3.2.1
release-3.2.10
release-3.2.11
release-3.2.12
release-3.2.13
release-3.2.14
release-3.2.2
release-3.2.3
release-3.2.4
release-3.3.0
release-3.3.0-telemetry-fix
release-3.3.1
release-3.3.2
release-3.4.0
release-3.4.1
release-3.4.2
release-3.4.3
release-3.4.4
release-3.4.5
release-3.4.6
release-3.4.7
release-3.5.0
release-3.5.1
release-3.5.2
release-3.5.3
release-3.6.0
release-3.6.1
release-3.6.5
release-3.6.6
release-3.7.0
release-3.7.1
release-3.7.2
release-3.8.0
release-3.8.1
release-3.8.2
release-3.8.3
release-3.9.0
release-3.9.1
release-3.9.2
release-3.9.3
release-4.0.0
release-4.0.1
release-4.0.2
release-4.1
release-4.1.0
release-4.1.1
release-4.10.0
release-4.10.0.1
release-4.10.1
release-4.10.2
release-4.10.2.1
release-4.10.2.2
release-4.10.3
release-4.2.0
release-4.2.1
release-4.3.0
release-4.3.1
release-4.4.0
release-4.4.1
release-4.5.0
release-4.5.1
release-4.5.2
release-4.6.0
release-4.7.0
release-4.7.1
release-4.8.0
release-4.8.5
release-4.9.0
release-4.9.1
release-5.0.0
release-5.0.0.1
release-5.0.0.2
release-5.0.0.3
release-5.0.1
release-5.0.2
release-5.1.0
release-5.1.1
revert-4427-player-cache-issue
revert-4537-SB-19763
revert-5244-sh-809
revert-5260-SB-table-3.3.0
revert-8284-release-5.0.0
sharathkashyap-patch-1
Tags unavailable
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/app/client/src/app/modules/content-search/components/page-section/page-section.component.html
+1
-1
...earch/components/page-section/page-section.component.html
src/app/client/src/app/modules/learn/components/learn-page/learn-page.component.spec.ts
+9
-1
.../learn/components/learn-page/learn-page.component.spec.ts
src/app/client/src/app/modules/learn/components/learn-page/learn-page.component.ts
+11
-0
...dules/learn/components/learn-page/learn-page.component.ts
with
21 additions
and
2 deletions
+21
-2
src/app/client/src/app/modules/content-search/components/page-section/page-section.component.html
+
1
−
1
View file @
87ba87d0
...
...
@@ -10,7 +10,7 @@
<!--/Section Title-->
<!--View all button-->
<button
class=
"sb-btn sb-btn-xs sb-btn-secondary ml-auto"
type=
"button"
*ngIf=
"section.contents.length >= 10 && section.name !=
'My T
rainings
'
"
(click)=
"navigateToViewAll(section)"
*ngIf=
"section.contents.length >= 10 && section
?
.name !=
resourceService?.frmelmnts?.lbl?.myt
rainings"
(click)=
"navigateToViewAll(section)"
appTelemetryInteract
[telemetryInteractEdata]=
"{id:'viewall-button' , type:'click' ,pageid:pageid , extra : {section: section.name}}"
>
{{ resourceService.frmelmnts.lnk.viewall}}
...
...
This diff is collapsed.
Click to expand it.
src/app/client/src/app/modules/learn/components/learn-page/learn-page.component.spec.ts
+
9
−
1
View file @
87ba87d0
...
...
@@ -36,7 +36,8 @@ describe('LearnPageComponent', () => {
'
lbl
'
:
{
'
mytrainings
'
:
'
My Trainings
'
}
}
},
languageSelected
$
:
of
({})
};
class
FakeActivatedRoute
{
queryParamsMock
=
new
BehaviorSubject
<
any
>
({
subject
:
[
'
English
'
]
});
...
...
@@ -114,9 +115,16 @@ describe('LearnPageComponent', () => {
});
it
(
'
should fetch enrolledSection from API and name must be My Trainings
'
,
()
=>
{
coursesService
.
initialize
();
spyOn
<
any
>
(
component
,
'
getLanguageChange
'
);
component
.
ngOnInit
();
component
.
getFilters
([{
code
:
'
board
'
,
range
:
[{
index
:
0
,
name
:
'
NCRT
'
},
{
index
:
1
,
name
:
'
CBSC
'
}]}]);
expect
(
component
.
enrolledSection
.
name
).
toEqual
(
resourceBundle
.
frmelmnts
.
lbl
.
mytrainings
);
expect
(
component
[
'
getLanguageChange
'
]).
toHaveBeenCalled
();
});
it
(
'
should change the title for My-training on language change
'
,
()
=>
{
component
.
enrolledSection
=
{
name
:
'
My Courses
'
};
component
[
'
getLanguageChange
'
]();
expect
(
component
.
enrolledSection
.
name
).
toBeDefined
();
});
it
(
'
should fetch hashTagId from API and filter details from data driven filter component
'
,
()
=>
{
coursesService
.
initialize
();
...
...
This diff is collapsed.
Click to expand it.
src/app/client/src/app/modules/learn/components/learn-page/learn-page.component.ts
+
11
−
0
View file @
87ba87d0
...
...
@@ -70,6 +70,7 @@ export class LearnPageComponent implements OnInit, OnDestroy, AfterViewInit {
}
}
ngOnInit
()
{
this
.
getLanguageChange
();
// TODO change the slug to 'Igot'
if
(
this
.
userService
.
slug
===
this
.
slugForProminentFilter
)
{
this
.
toUseFrameWorkData
=
true
;
...
...
@@ -100,6 +101,16 @@ export class LearnPageComponent implements OnInit, OnDestroy, AfterViewInit {
this
.
toasterService
.
error
(
this
.
resourceService
.
messages
.
fmsg
.
m0002
);
});
}
private
getLanguageChange
()
{
this
.
resourceService
.
languageSelected$
.
pipe
(
takeUntil
(
this
.
unsubscribe$
))
.
subscribe
(
item
=>
{
if
(
_
.
get
(
this
.
enrolledSection
,
'
name
'
))
{
this
.
enrolledSection
.
name
=
this
.
resourceService
.
frmelmnts
.
lbl
.
mytrainings
;
}
});
}
private
fetchContentOnParamChange
()
{
combineLatest
(
this
.
activatedRoute
.
params
,
this
.
activatedRoute
.
queryParams
)
.
pipe
(
...
...
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