Skip to content

Commit

Permalink
Merge pull request #444 from Rushikesh-Sonawane99/release-1.0.0
Browse files Browse the repository at this point in the history
Issue #PS-2649 chore: Replaced assessment api with knowledge apis
  • Loading branch information
itsvick authored Nov 27, 2024
2 parents 6e2502b + d021717 commit 8fe8e08
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 11 deletions.
6 changes: 3 additions & 3 deletions app.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export const DaysOfWeek = {
Sat: 6,
};

export const Program = 'Second chance';
export const Program = 'secondchance';

export const tenantId = process.env.NEXT_PUBLIC_TENANT_ID || '';
if (!tenantId) {
Expand All @@ -86,8 +86,8 @@ if (!frameworkId) {
}

export enum AssessmentType {
PRE_TEST = 'Pre Test',
POST_TEST = 'Post Test',
PRE_TEST = 'pre-test',
POST_TEST = 'post-test',
}

export const RequisiteType = {
Expand Down
2 changes: 1 addition & 1 deletion src/components/AssessmentReport.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const AssessmentReport: React.FC<AssessmentReportProp> = ({
const filters = {
program: [Program],
se_boards: [stateName],
assessment1: type,
assessmentType: type,
};

try {
Expand Down
6 changes: 5 additions & 1 deletion src/components/AssessmentReportCard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,11 @@ const AssessmentReportCard: React.FC<AssessmentReportCardProp> = ({
fontWeight: '400',
}}
>
{cardTitle}
{cardTitle === 'pre-test'
? t('PROFILE.PRE_TEST')
: cardTitle === 'post-test'
? t('PROFILE.POST_TEST')
: cardTitle}
</Box>
<Box
sx={{
Expand Down
2 changes: 1 addition & 1 deletion src/pages/learner/[userId].tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ const LearnerProfile: React.FC<LearnerProfileProp> = ({
}}
>
<CardContent>
<AssessmentReport classId={classId} userId={userId} />
<AssessmentReport classId={cohortId} userId={userId} />
</CardContent>
</Card>
</Box>
Expand Down
12 changes: 7 additions & 5 deletions src/services/AssesmentService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@ export const getAssessmentList = async ({
export const getDoIdForAssessmentDetails = async ({
filters,
}: GetDoIdServiceParam): Promise<any> => {
// const apiUrl: string = `${URL_CONFIG.API.COMPOSITE_SEARCH}`;
const apiUrl: string =
'https://sunbirdsaas.com/api/content/v1/search?orgdetails=orgName%2Cemail&licenseDetails=name%2Cdescription%2Curl';
const apiUrl: string = `${URL_CONFIG.API.COMPOSITE_SEARCH}`;
// const apiUrl: string =
// 'https://sunbirdsaas.com/api/content/v1/search?orgdetails=orgName%2Cemail&licenseDetails=name%2Cdescription%2Curl';
const data = {
request: {
filters: {
program: filters.program,
se_boards: filters.se_boards,
board: filters.se_boards,
// subject: filters.subject,
assessment1: filters.assessment1,
assessmentType: filters.assessment1,
status: ['Live'],
primaryCategory: ['Practice Question Set'],
},
},
};
Expand Down

0 comments on commit 8fe8e08

Please sign in to comment.