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
025c6e1a
Commit
025c6e1a
authored
4 years ago
by
sudip mukherjee
Browse files
Options
Download
Patches
Plain Diff
ISsue #SH-601 fix: Mentor is not able to open course dashboard issue
parent
590f567a
master
Dark_theme
SB-25589
SB-28090
aws_fileRead
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.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-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/dashboard/components/course-progress/course-progress.component.html
+12
-12
...components/course-progress/course-progress.component.html
src/app/client/src/app/modules/dashboard/components/course-progress/course-progress.component.spec.ts
+0
-20
...ponents/course-progress/course-progress.component.spec.ts
src/app/client/src/app/modules/dashboard/components/course-progress/course-progress.component.ts
+2
-0
...d/components/course-progress/course-progress.component.ts
with
14 additions
and
32 deletions
+14
-32
src/app/client/src/app/modules/dashboard/components/course-progress/course-progress.component.html
+
12
−
12
View file @
025c6e1a
...
...
@@ -69,44 +69,44 @@
</div>
<div
class=
"d-flex mt-16 mb-0 sb-course-progress-status d-flex flex-w-wrap px-16 py-8 flex-ai-center"
*ngIf=
"
dashboarData
"
>
*ngIf=
"
currentBatch
"
>
<span
class=
"course-start-dt course-participants-label pr-16"
>
<span
*ngIf=
"
dashboarData
.startDate"
>
<span
*ngIf=
"
currentBatch
.startDate"
>
{{resourceService?.frmelmnts?.lbl?.batchstartdate}}
</span>
<span
class=
"font-weight-bold"
>
{{
dashboarData
.startDate | dateFormat :'DD/MM/YYYY' }}
</span>
<span
class=
"font-weight-bold"
>
{{
currentBatch
.startDate | dateFormat :'DD/MM/YYYY' }}
</span>
</span>
<span
class=
"course-end-dt course-participants-label px-16"
>
<span>
{{resourceService?.frmelmnts?.lbl?.batchenddate}}
</span>
<span
*ngIf=
"
dashboarData
.endDate"
class=
"font-weight-bold"
>
{{
dashboarData
.endDate | dateFormat :'DD/MM/YYYY'}}
</span>
<span
*ngIf=
"!
dashboarData
.endDate"
>
-
</span>
<span
*ngIf=
"
currentBatch
.endDate"
class=
"font-weight-bold"
>
{{
currentBatch
.endDate | dateFormat :'DD/MM/YYYY'}}
</span>
<span
*ngIf=
"!
currentBatch
.endDate"
>
-
</span>
</span>
<span
*ngIf=
"
dashboarData.c
ount"
class=
"course-participants course-participants-label px-16"
>
<span
*ngIf=
"
currentBatch.participantC
ount"
class=
"course-participants course-participants-label px-16"
>
<span>
{{resourceService?.frmelmnts?.lbl?.participants}}
</span>
<span
class=
"font-weight-bold"
>
{{
dashboarData.c
ount}}
</span>
<span
class=
"font-weight-bold"
>
{{
currentBatch.participantC
ount}}
</span>
</span>
<span
*ngIf=
"
dashboarData
.completedCount!==null"
<span
*ngIf=
"
currentBatch
.completedCount!==null"
class=
"course-participants course-participants-label px-16"
>
<span>
{{resourceService?.frmelmnts?.lbl?.completedCourse}}
</span>
<span
class=
"font-weight-bold"
>
{{
dashboarData
.completedCount}}
</span>
<span
class=
"font-weight-bold"
>
{{
currentBatch
.completedCount}}
</span>
</span>
<!-- TODO: Need to revert when changes are done from KP side-->
<!-- <span *ngIf="
dashboarData
.certificateCount!==null"
<!-- <span *ngIf="
currentBatch
.certificateCount!==null"
class="course-participants course-participants-label px-16">
<span>{{resourceService?.frmelmnts?.lbl?.certificatesIssued}}
</span>
<span class="font-weight-bold"> {{
dashboarData
.certificateCount}}</span>
<span class="font-weight-bold"> {{
currentBatch
.certificateCount}}</span>
</span> -->
</div>
</div>
<div
class=
"sb-toaster sb-toast-info sb-mw-100 sb-toast-sm-padding"
*ngIf=
"
dashboarData && dashboarData
.count>10000"
>
*ngIf=
"
currentBatch && currentBatch
.count>10000"
>
<div
class=
"sb-toast-body"
>
<div
class=
"sb-toast-texts"
>
<div
class=
"sb-toast-message"
>
{{resourceService?.frmelmnts?.instn?.t0085}}
</div>
...
...
This diff is collapsed.
Click to expand it.
src/app/client/src/app/modules/dashboard/components/course-progress/course-progress.component.spec.ts
+
0
−
20
View file @
025c6e1a
...
...
@@ -140,26 +140,6 @@ describe('CourseProgressComponent', () => {
expect
(
component
.
queryParams
.
timePeriod
).
toEqual
(
'
7d
'
);
}));
it
(
'
spy on populateCourseDashboardData()
'
,
inject
([
UserService
,
CourseProgressService
],
(
userService
,
courseService
)
=>
{
userService
.
_userData$
.
next
({
err
:
null
,
userProfile
:
testData
.
mockUserData
.
userMockData
});
fixture
.
detectChanges
();
spyOn
(
courseService
,
'
getDashboardData
'
).
and
.
returnValue
(
observableOf
(
testData
.
mockUserData
.
populateCourseDashboardDataRes
));
component
.
populateCourseDashboardData
(
testData
.
mockUserData
.
getBatchResZero
.
result
.
response
);
expect
(
component
.
dashboarData
).
toBeDefined
();
expect
(
component
.
showLoader
).
toEqual
(
false
);
}));
it
(
'
spy on populateCourseDashboardData() with error
'
,
inject
([
UserService
,
CourseProgressService
,
ResourceService
,
ToasterService
],
(
userService
,
courseService
,
resourceService
,
toasterService
)
=>
{
userService
.
_userData$
.
next
({
err
:
null
,
userProfile
:
testData
.
mockUserData
.
userMockData
});
fixture
.
detectChanges
();
spyOn
(
courseService
,
'
getDashboardData
'
).
and
.
callFake
(()
=>
observableThrowError
(
testData
.
mockUserData
.
dashboardError
));
spyOn
(
toasterService
,
'
error
'
).
and
.
callThrough
();
component
.
populateCourseDashboardData
(
testData
.
mockUserData
.
getBatchResZero
.
result
.
response
);
expect
(
toasterService
.
error
).
toHaveBeenCalledWith
(
testData
.
mockUserData
.
dashboardError
.
error
.
params
.
errmsg
);
}));
it
(
'
spy on downloadDashboardData()
'
,
inject
([
UserService
,
CourseProgressService
,
ResourceService
,
ToasterService
],
(
userService
,
courseService
,
resourceService
,
toasterService
)
=>
{
userService
.
_userData$
.
next
({
err
:
null
,
userProfile
:
testData
.
mockUserData
.
userMockData
});
...
...
This diff is collapsed.
Click to expand it.
src/app/client/src/app/modules/dashboard/components/course-progress/course-progress.component.ts
+
2
−
0
View file @
025c6e1a
...
...
@@ -249,6 +249,7 @@ export class CourseProgressComponent implements OnInit, OnDestroy, AfterViewInit
* @param {string} batchId batch identifier
*/
setBatchId
(
batch
?:
any
):
void
{
this
.
showWarningDiv
=
false
;
this
.
queryParams
.
batchIdentifier
=
batch
.
id
;
this
.
queryParams
.
pageNumber
=
this
.
pageNumber
;
this
.
searchText
=
''
;
...
...
@@ -292,6 +293,7 @@ export class CourseProgressComponent implements OnInit, OnDestroy, AfterViewInit
* To method fetches the dashboard data with specific batch id and timeperiod
*/
populateCourseDashboardData
(
batch
?:
any
):
void
{
return
;
if
(
!
batch
&&
this
.
currentBatch
)
{
batch
=
this
.
currentBatch
;
}
...
...
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