diff --git a/src/api/organization.ts b/src/api/organization.ts index 2543b8dc7..0397c2447 100644 --- a/src/api/organization.ts +++ b/src/api/organization.ts @@ -1,4 +1,4 @@ -import { axiosGet, axiosPost, axiosPut } from "../services/apiRequests" +import { axiosGet, axiosPost, axiosPublicOrganisationGet, axiosPut } from "../services/apiRequests" import { apiRoutes } from "../config/apiRoutes"; import { getFromLocalStorage } from "./Auth"; @@ -305,23 +305,6 @@ export const createConnection = async (orgName: string) => { // public profile -export const getPublicUsers = async (pageNumber: number, pageSize: number, search :string) => { - - const url = `${apiRoutes.public.users}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}` - - const axiosPayload = { - url, - } - - try { - return await axiosPublicUserGet(axiosPayload); - } - catch (error) { - const err = error as Error - return err?.message - } -} - export const getPublicOrganizations = async (pageNumber: number, pageSize: number, search :string) => { const url = `${apiRoutes.public.organizations}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}` @@ -337,7 +320,7 @@ export const getPublicOrganizations = async (pageNumber: number, pageSize: numbe } try { - return await axiosGet(axiosPayload); + return await axiosPublicOrganisationGet(axiosPayload); } catch (error) { const err = error as Error diff --git a/src/components/Resources/Schema/SchemasList.tsx b/src/components/Resources/Schema/SchemasList.tsx index 79ff5e5b9..8d8db0cbc 100644 --- a/src/components/Resources/Schema/SchemasList.tsx +++ b/src/components/Resources/Schema/SchemasList.tsx @@ -17,6 +17,7 @@ import type { SchemaDetails } from '../../Verification/interface'; import SearchInput from '../../SearchInput'; import { getFromLocalStorage } from '../../../api/Auth'; import { pathRoutes } from '../../../config/pathRoutes'; +import { getOrganizationById } from '../../../api/organization'; const SchemaList = (props: { schemaSelectionCallback: (schemaId: string, schemaDetails: SchemaDetails) => void; }) => { const [schemaList, setSchemaList] = useState([]) @@ -33,6 +34,7 @@ const SchemaList = (props: { schemaSelectionCallback: (schemaId: string, schemaD allSearch: "" }) + const [walletStatus, setWalletStatus]=useState(false) const [totalItem, setTotalItem] = useState(0) const getSchemaList = async (schemaListAPIParameter: GetAllSchemaListParameter, flag: boolean) => { try { @@ -122,6 +124,23 @@ const SchemaList = (props: { schemaSelectionCallback: (schemaId: string, schemaD } }; + const fetchOrganizationDetails = async () => { + setLoading(true) + const orgId = await getFromLocalStorage(storageKeys.ORG_ID) + const response = await getOrganizationById(orgId); + const { data } = response as AxiosResponse + if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { + if (data?.data?.org_agents && data?.data?.org_agents?.length > 0) { + setWalletStatus(true) + } + } + setLoading(false) +} + +useEffect(()=>{ + fetchOrganizationDetails() +},[]) + return (
+
{' '} Verification Details
diff --git a/src/components/Verification/SchemaCredDefDetails.tsx b/src/components/Verification/SchemaCredDefDetails.tsx index 888912fe3..d1cf1b9d2 100644 --- a/src/components/Verification/SchemaCredDefDetails.tsx +++ b/src/components/Verification/SchemaCredDefDetails.tsx @@ -7,7 +7,7 @@ const SchemaCredDefDetails = ({ schemaCredDefList }: SchemaCredDefProps) => { return ( <> - {schemaCredDefList.map((item, index) => ( + {schemaCredDefList.map((item) => ({orgUser.email}
+{orgUser.email}
}{orgData?.description}
diff --git a/src/components/publicProfile/PublicProfiles.tsx b/src/components/publicProfile/PublicProfiles.tsx index f89513402..830243c03 100644 --- a/src/components/publicProfile/PublicProfiles.tsx +++ b/src/components/publicProfile/PublicProfiles.tsx @@ -1,6 +1,5 @@ 'use client'; -import PublicUserList from './PublicUserList'; import OrganisationPublicProfile from './OrganisationPublicProfile'; const PublicProfile = () => { @@ -27,19 +26,6 @@ const PublicProfile = () => { Organisations -