@sunbird-cb/cbp-ai 0.1.92 → 0.1.94

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -3023,6 +3023,9 @@ class SuggestMoreCoursesComponent {
3023
3023
  createdOn: 'desc'
3024
3024
  };
3025
3025
  }
3026
+ else {
3027
+ reqBody['request']['sort_by'] = {};
3028
+ }
3026
3029
  console.log('API FILTER PAYLOAD', JSON.stringify(reqBody, null, 2));
3027
3030
  this.sharedService.getIGOTSuggestedCourses(reqBody).subscribe({
3028
3031
  next: (res) => {
@@ -12941,12 +12944,14 @@ class ViewFinalCbpPlanComponent {
12941
12944
  const competencies = (c.competencies || [])
12942
12945
  .map((cc) => `${cc.competencyAreaName} → ${cc.competencyThemeName} → ${cc.competencySubThemeName}`)
12943
12946
  .join(" | ");
12944
- return (`${i + 1}. Course Name: ${c.course}\n` +
12945
- ` Identifier: ${c.identifier}\n` +
12947
+ return (`${i + 1}. Course Name: ${c?.course}\n` +
12948
+ ` Identifier: ${c?.identifier}\n` +
12946
12949
  ` Duration (mins): ${Math.round(+c.duration / 60)}\n` +
12947
- ` Relevancy: ${c.relevancy}%\n` +
12948
- ` Rationale: ${c.rationale}\n` +
12949
- ` Organisation: ${(c.organisation || []).join(", ")}\n` +
12950
+ ` Relevancy: ${c?.relevancy}%\n` +
12951
+ ` Rationale: ${c?.rationale}\n` +
12952
+ ` Organisation: ${Array.isArray(c?.organisation)
12953
+ ? c.organisation.join(", ")
12954
+ : c?.organisation ?? ""}\n` +
12950
12955
  ` Competencies: ${competencies}`);
12951
12956
  }).join("\n\n");
12952
12957
  return {