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
d8c3e800
Unverified
Commit
d8c3e800
authored
2 years ago
by
Rajeev
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #8422 from rajeshkumaravel/release-5.1.0
Issue #ED-577 fix: API call checks added
parents
d01f81c6
ea10f0e4
release-5.1.0
Tags unavailable
1 merge request
!1
Feature/inquiry server validation
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/app/client/src/app/modules/dashboard/components/course-progress/course-progress.component.ts
+65
-63
...d/components/course-progress/course-progress.component.ts
with
65 additions
and
63 deletions
+65
-63
src/app/client/src/app/modules/dashboard/components/course-progress/course-progress.component.ts
+
65
−
63
View file @
d8c3e800
...
...
@@ -341,70 +341,72 @@ export class CourseProgressComponent implements OnInit, OnDestroy, AfterViewInit
}
getSummaryReports
()
{
const
request
=
{
'
request
'
:
{
'
filters
'
:
{
'
collectionId
'
:
_
.
get
(
this
.
currentBatch
,
'
collectionId
'
)
||
_
.
get
(
this
.
currentBatch
,
'
courseId
'
),
'
batchId
'
:
_
.
get
(
this
.
currentBatch
,
'
batchId
'
)
},
'
groupBy
'
:
[
'
dist
'
,
'
state
'
],
'
granularity
'
:
'
ALL
'
// data conformation
}
};
this
.
onDemandReportService
.
getSummeryReports
(
request
).
subscribe
((
reports
:
any
)
=>
{
if
(
reports
&&
reports
.
result
&&
!
_
.
isEmpty
(
reports
.
result
))
{
const
result
=
_
.
get
(
reports
,
'
result
'
);
const
groupData
=
_
.
get
(
result
,
'
groupBy
'
);
this
.
stateWiseReportData
=
_
.
map
(
groupData
,
(
x
)
=>
{
return
{
state
:
x
.
state
,
district
:
x
.
district
,
noOfEnrollments
:
this
.
getFieldValue
(
x
.
values
,
'
enrolment
'
)
};
});
this
.
stateWiseReportData
=
[...
this
.
stateWiseReportData
];
const
metrics
=
_
.
get
(
result
,
'
metrics
'
);
this
.
currentBatch
.
participantCount
=
this
.
getFieldValue
(
metrics
,
'
enrolment
'
);
this
.
currentBatch
.
completedCount
=
this
.
getFieldValue
(
metrics
,
'
complete
'
);
this
.
currentBatch
.
lastUpdatedOn
=
_
.
get
(
result
,
'
lastUpdatedOn
'
)
||
''
;
}
this
.
generateDataForDF
(
this
.
currentBatch
);
},
error
=>
{
this
.
stateWiseReportData
=
[
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Chittoor
'
,
noOfEnrollments
:
20
},
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Vishakapatanam
'
,
noOfEnrollments
:
50
},
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Guntur
'
,
noOfEnrollments
:
70
},
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Kadapa
'
,
noOfEnrollments
:
65
},
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Nellore
'
,
noOfEnrollments
:
100
},
{
state
:
'
Telengana
'
,
district
:
'
Hydrabad
'
,
noOfEnrollments
:
45
if
(
_
.
get
(
this
.
currentBatch
,
'
collectionId
'
)
||
_
.
get
(
this
.
currentBatch
,
'
courseId
'
))
{
const
request
=
{
'
request
'
:
{
'
filters
'
:
{
'
collectionId
'
:
_
.
get
(
this
.
currentBatch
,
'
collectionId
'
)
||
_
.
get
(
this
.
currentBatch
,
'
courseId
'
),
'
batchId
'
:
_
.
get
(
this
.
currentBatch
,
'
batchId
'
)
},
'
groupBy
'
:
[
'
dist
'
,
'
state
'
],
'
granularity
'
:
'
ALL
'
// data conformation
}
];
this
.
toasterService
.
error
(
_
.
get
(
this
.
resourceService
,
'
messages.fmsg.m0004
'
));
this
.
generateDataForDF
(
this
.
currentBatch
);
});
};
this
.
onDemandReportService
.
getSummeryReports
(
request
).
subscribe
((
reports
:
any
)
=>
{
if
(
reports
&&
reports
.
result
&&
!
_
.
isEmpty
(
reports
.
result
))
{
const
result
=
_
.
get
(
reports
,
'
result
'
);
const
groupData
=
_
.
get
(
result
,
'
groupBy
'
);
this
.
stateWiseReportData
=
_
.
map
(
groupData
,
(
x
)
=>
{
return
{
state
:
x
.
state
,
district
:
x
.
district
,
noOfEnrollments
:
this
.
getFieldValue
(
x
.
values
,
'
enrolment
'
)
};
});
this
.
stateWiseReportData
=
[...
this
.
stateWiseReportData
];
const
metrics
=
_
.
get
(
result
,
'
metrics
'
);
this
.
currentBatch
.
participantCount
=
this
.
getFieldValue
(
metrics
,
'
enrolment
'
);
this
.
currentBatch
.
completedCount
=
this
.
getFieldValue
(
metrics
,
'
complete
'
);
this
.
currentBatch
.
lastUpdatedOn
=
_
.
get
(
result
,
'
lastUpdatedOn
'
)
||
''
;
}
this
.
generateDataForDF
(
this
.
currentBatch
);
},
error
=>
{
this
.
stateWiseReportData
=
[
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Chittoor
'
,
noOfEnrollments
:
20
},
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Vishakapatanam
'
,
noOfEnrollments
:
50
},
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Guntur
'
,
noOfEnrollments
:
70
},
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Kadapa
'
,
noOfEnrollments
:
65
},
{
state
:
'
Andhra Pradesh
'
,
district
:
'
Nellore
'
,
noOfEnrollments
:
100
},
{
state
:
'
Telengana
'
,
district
:
'
Hydrabad
'
,
noOfEnrollments
:
45
}
];
this
.
toasterService
.
error
(
_
.
get
(
this
.
resourceService
,
'
messages.fmsg.m0004
'
));
this
.
generateDataForDF
(
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