From a1c678cd82e087b30b044a5fa185ec3f87894693 Mon Sep 17 00:00:00 2001 From: Rushikesh-Sonawane99 Date: Mon, 25 Nov 2024 18:51:12 +0530 Subject: [PATCH 1/2] Issue #PS-000 chore: Added hyphen on UI when no subjects present for teacher profile and replaced content/v1 search api with /action/composite/v3/search --- src/pages/user-profile/[userId].tsx | 16 +++++++++++++--- src/services/AssesmentService.ts | 7 ++++--- 2 files changed, 17 insertions(+), 6 deletions(-) diff --git a/src/pages/user-profile/[userId].tsx b/src/pages/user-profile/[userId].tsx index bff527e0..12faf7ee 100644 --- a/src/pages/user-profile/[userId].tsx +++ b/src/pages/user-profile/[userId].tsx @@ -543,8 +543,7 @@ const TeacherProfile: React.FC = ({ flexWrap: 'wrap', }} > - {orderedSubjects && - orderedSubjects.length > 0 && + {orderedSubjects && orderedSubjects.length > 0 ? ( orderedSubjects.map((subject: any) => { const isMutualSubject = mutualSubjects?.includes(subject); @@ -570,7 +569,18 @@ const TeacherProfile: React.FC = ({ {getLabelForSubject(subject)} ); - })} + }) + ) : ( + + - + + )} ); diff --git a/src/services/AssesmentService.ts b/src/services/AssesmentService.ts index 5ffa64bb..bb2794aa 100644 --- a/src/services/AssesmentService.ts +++ b/src/services/AssesmentService.ts @@ -5,6 +5,7 @@ import { ISearchAssessment, } from '@/utils/Interfaces'; import { post } from './RestClient'; +import { URL_CONFIG } from '@/utils/url.config'; export const getAssessmentList = async ({ sort, @@ -25,9 +26,9 @@ export const getAssessmentList = async ({ export const getDoIdForAssessmentDetails = async ({ filters, }: GetDoIdServiceParam): Promise => { - 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: { From 46e0b991b1229939890f9ff4e6fd2e41eb0b67bb Mon Sep 17 00:00:00 2001 From: Rushikesh-Sonawane99 Date: Mon, 25 Nov 2024 18:58:33 +0530 Subject: [PATCH 2/2] Issue #PS-000 chore: commented /action/composite/v3/search and used content/v1 search api --- src/services/AssesmentService.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/AssesmentService.ts b/src/services/AssesmentService.ts index bb2794aa..80cfca42 100644 --- a/src/services/AssesmentService.ts +++ b/src/services/AssesmentService.ts @@ -26,9 +26,9 @@ export const getAssessmentList = async ({ export const getDoIdForAssessmentDetails = async ({ filters, }: GetDoIdServiceParam): Promise => { - 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: {