diff --git a/src/components/Ecosystem/MemberList.tsx b/src/components/Ecosystem/MemberList.tsx index db713233f..b5fd7fe26 100644 --- a/src/components/Ecosystem/MemberList.tsx +++ b/src/components/Ecosystem/MemberList.tsx @@ -1,6 +1,6 @@ import { useEffect, useState } from 'react'; import { getEcosystemMemberList } from '../../api/ecosystem'; -import { apiStatusCodes } from '../../config/CommonConstant'; +import { apiStatusCodes, storageKeys } from '../../config/CommonConstant'; import type { AxiosResponse } from 'axios'; import DataTable from '../../commonComponents/datatable'; import type { TableData } from '../../commonComponents/datatable/interface'; @@ -8,6 +8,7 @@ import DateTooltip from '../Tooltip'; import { dateConversion } from '../../utils/DateConversion'; import { AlertComponent } from '../AlertComponent'; import { Pagination } from 'flowbite-react'; +import { getFromLocalStorage } from '../../api/Auth'; const initialPageState = { pageNumber: 1, @@ -20,7 +21,9 @@ const MemberList = () => { const [memberList, setMemberList] = useState([]); const [error, setError] = useState(null); const [currentPage, setCurrentPage] = useState(initialPageState); + const getEcosystemMembers = async () => { + const userOrgId= await getFromLocalStorage(storageKeys.ORG_ID) setLoading(true); const response = await getEcosystemMemberList( currentPage.pageNumber, @@ -28,6 +31,7 @@ const MemberList = () => { '', ); const { data } = response as AxiosResponse; + if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { const totalPages = data?.data?.totalPages; @@ -47,9 +51,10 @@ const MemberList = () => { return 0; } }; - const sortedMemberList = data?.data?.members?.sort(compareMembers); + const sortedMemberList = data?.data?.members?.sort(compareMembers); const membersData = sortedMemberList?.map( (member: { + orgId: string; ecosystem: {createDateTime: string}; ecosystemRole: { name: string }; orgName: string; @@ -79,7 +84,7 @@ const MemberList = () => { : 'bg-green-100 text-green-800 dark:bg-gray-700 dark:text-green-400 border border-green-100 dark:border-green-500' } text-sm font-medium mr-2 px-2.5 py-1 rounded-md`} > - {member?.createDateTime === member?.ecosystem?.createDateTime ? member?.ecosystemRole?.name + (' (You)') : member?.ecosystemRole?.name} + {member?.orgId === userOrgId ? member?.ecosystemRole?.name + (' (You)') : member?.ecosystemRole?.name} ) : ( 'Not available' diff --git a/src/components/Verification/Verification.tsx b/src/components/Verification/Verification.tsx index 9a0f0981c..8d0365a04 100644 --- a/src/components/Verification/Verification.tsx +++ b/src/components/Verification/Verification.tsx @@ -57,7 +57,9 @@ const VerificationCred = () => { const schemaAttributes = await getFromLocalStorage(storageKeys.SCHEMA_ATTR) const parsedSchemaDetails = JSON.parse(schemaAttributes) || []; const attributes = parsedSchemaDetails.attribute.map((ele: any) => { - const attributes = ele.attributeName ? ele.attributeName : 'Not available'; + const attributesName = ele.attributeName ? ele.attributeName : 'Not available'; + const displayName = ele.displayName ? ele.displayName : 'Not available'; + return { data: [ { @@ -68,7 +70,7 @@ const VerificationCred = () => { type="checkbox" onClick={(event: React.MouseEvent) => { const inputElement = event?.target as HTMLInputElement; - selectConnection(attributes, inputElement?.checked); + selectConnection(attributesName, inputElement?.checked); }} value="" className="w-4 h-4 text-blue-600 bg-gray-100 border-gray-300 rounded focus:ring-blue-500 dark:focus:ring-blue-600 dark:ring-offset-gray-800 focus:ring-2 dark:bg-gray-700 dark:border-gray-600 cursor-pointer" @@ -76,7 +78,7 @@ const VerificationCred = () => { ) }, - { data: attributes }, + { data: displayName }, ] }; }); diff --git a/src/components/publicProfile/OrganisationPublicProfile.tsx b/src/components/publicProfile/OrganisationPublicProfile.tsx index d5834913d..533deda82 100644 --- a/src/components/publicProfile/OrganisationPublicProfile.tsx +++ b/src/components/publicProfile/OrganisationPublicProfile.tsx @@ -9,6 +9,7 @@ import { Card, Pagination } from 'flowbite-react'; import CustomSpinner from '../CustomSpinner'; import CustomAvatar from '../Avatar'; import { EmptyListMessage } from '../EmptyListComponent'; +import { AlertComponent } from '../AlertComponent'; const OrganisationPublicProfile = () => { const initialPageState = { @@ -78,6 +79,13 @@ const OrganisationPublicProfile = () => { return (
+ { + setError(null); + }} + />
diff --git a/src/components/publicProfile/ProfileDesign.astro b/src/components/publicProfile/ProfileDesign.astro index 544d3ebd5..21f4038eb 100644 --- a/src/components/publicProfile/ProfileDesign.astro +++ b/src/components/publicProfile/ProfileDesign.astro @@ -4,9 +4,9 @@ import CustomAvatar from "../../components/Avatar" --- -
-
-
+
+
+
{orgData?.logoUrl ? ( diff --git a/src/components/publicProfile/WalletDetailQRLayout.astro b/src/components/publicProfile/WalletDetailQRLayout.astro index dcda37070..c44893c49 100644 --- a/src/components/publicProfile/WalletDetailQRLayout.astro +++ b/src/components/publicProfile/WalletDetailQRLayout.astro @@ -1,5 +1,6 @@ --- import CustomQRCode from "../../commonComponents/QRcode"; +import { EmptyListMessage } from "../EmptyListComponent"; const {orgData} = Astro.props interface UserObject { orgDid:string @@ -13,7 +14,7 @@ interface UserObject { } --- -
+

Wallet Details

@@ -62,17 +63,19 @@ interface UserObject { }
: -

- - Wallet details are not avilable. Need to create wallet. -

+
+ +
}
-{orgData?.org_agents.length > 0 && +{orgData?.org_agents.length > 0 ?
{ orgData?.org_agents && -
}
-
} +
+ : + '' + }
diff --git a/src/pages/org/[org].astro b/src/pages/org/[org].astro index 0cb46146c..615e3c04e 100644 --- a/src/pages/org/[org].astro +++ b/src/pages/org/[org].astro @@ -24,7 +24,7 @@ const orgUsersData = orgUsersFilterByRole?.map( ); --- -
+