Skip to content

Commit ae145b7

Browse files
authored
Merge pull request #2112 from AkshataKatwal16/12-b
Issue feat:Some old courses doesnt have program for ppragyanpath adde…
2 parents 6b6f50c + 1944738 commit ae145b7

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

apps/learner-web-app/src/components/Content/Player.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ const App = ({
6161
const isThematicPath = currentPath.includes('/themantic');
6262
const isPosPath = currentPath.includes('/pos');
6363

64-
if(!isThematicPath && !isPosPath) {
64+
if(!isThematicPath && !isPosPath && rt?.program) {
6565

6666
console.log('response=======>', rt?.program);
6767
if (!rt?.program?.includes(localStorage.getItem('userProgram')) && !rt.program.includes('Open School'))

mfes/content/src/components/Content/ContentEnroll.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const isThematicPath = currentPath.includes('/themantic');
6262
const isPosPath = currentPath.includes('/pos');
6363
console.log('isThematicPath=======>', isThematicPath);
6464

65-
if(!isThematicPath && !isPosPath) {
65+
if(!isThematicPath && !isPosPath && result?.program) {
6666

6767
if (!result?.program?.includes(localStorage.getItem('userProgram')) && !result.program.includes('Open School'))
6868
{
@@ -84,7 +84,7 @@ if(!isThematicPath && !isPosPath) {
8484
'inprogress',
8585
'completed',
8686
'viewCertificate',
87-
].includes(data?.result?.status)
87+
].includes?.(data?.result?.status)
8888
) {
8989
if (props?.getIfEnrolled) {
9090
props?.getIfEnrolled(

mfes/content/src/components/Content/CourseUnitDetails.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default function Details(props: DetailsProps) {
7979
const currentPath = typeof window !== 'undefined' ? window.location.pathname : '';
8080
const isThematicPath = currentPath.includes('/themantic');
8181
const isPosPath = currentPath.includes('/pos');
82-
if(!isThematicPath && !isPosPath) {
82+
if(!isThematicPath && !isPosPath && resultHierarchyCourse?.program) {
8383
console.log('resultHierarchyCourse=======>', resultHierarchyCourse?.program);
8484
if (!resultHierarchyCourse?.program?.includes(localStorage.getItem('userProgram')) && !resultHierarchyCourse.program.includes('Open School'))
8585
{

mfes/content/src/components/Content/List.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ export default function Content(props: Readonly<ContentProps>) {
316316
offset: adjustedOffset,
317317
limit: adjustedLimit,
318318
signal: controller.signal,
319-
noPrimaryCategory: true,
319+
primaryCategory: ['Course'],
320320
});
321321
}
322322
else{

0 commit comments

Comments
 (0)