From e8ec9c7b956653f744ff13cb407816e67d9d369f Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 16 Oct 2023 11:02:18 +0530 Subject: [PATCH 1/3] fix: pagination issues Signed-off-by: karan --- src/api/invitations.ts | 2 +- src/components/Ecosystem/MemberList.tsx | 2 +- src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx | 2 +- src/components/EcosystemInvite/SentInvitations.tsx | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/api/invitations.ts b/src/api/invitations.ts index 9fd30583f..28303043e 100644 --- a/src/api/invitations.ts +++ b/src/api/invitations.ts @@ -208,7 +208,7 @@ export const getEcosystemInvitations = async (pageNumber: number, pageSize: numb const ecosystemId = await getFromLocalStorage(storageKeys.ECOSYSTEM_ID); const orgId = await getFromLocalStorage(storageKeys.ORG_ID); - const url = `${apiRoutes.Ecosystem.root}/${ecosystemId}/${orgId}${apiRoutes.Ecosystem.invitations}` + const url = `${apiRoutes.Ecosystem.root}/${ecosystemId}/${orgId}${apiRoutes.Ecosystem.invitations}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}` const token = await getFromLocalStorage(storageKeys.TOKEN) diff --git a/src/components/Ecosystem/MemberList.tsx b/src/components/Ecosystem/MemberList.tsx index a7d815a8a..9a06c9ade 100644 --- a/src/components/Ecosystem/MemberList.tsx +++ b/src/components/Ecosystem/MemberList.tsx @@ -176,7 +176,7 @@ const MemberList = () => { loading={loading} > - {currentPage.pageNumber > 1 && ( + {currentPage.total > 1 && (
{ ) )} - {currentPage.pageNumber > 1 &&
+ {currentPage.total > 1 &&
{
)} - {currentPage.pageNumber >1 && ( + {currentPage.total > 1 && (
Date: Mon, 16 Oct 2023 11:12:28 +0530 Subject: [PATCH 2/3] fix: type error Signed-off-by: karan --- src/components/Ecosystem/MemberList.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/Ecosystem/MemberList.tsx b/src/components/Ecosystem/MemberList.tsx index 9a06c9ade..76784ba2d 100644 --- a/src/components/Ecosystem/MemberList.tsx +++ b/src/components/Ecosystem/MemberList.tsx @@ -58,7 +58,7 @@ const MemberList = () => { return { data: [ { - data: member.orgName || 'Not avilable', + data: member.orgName || 'Not available', }, { data: From fd8de7dd92c43bd6fe367195b6ea2e95a6803c01 Mon Sep 17 00:00:00 2001 From: karan Date: Mon, 16 Oct 2023 11:34:34 +0530 Subject: [PATCH 3/3] refactor: issuanc and verification flow Signed-off-by: karan --- src/components/Ecosystem/MemberList.tsx | 23 ++++++++++--------- .../Resources/Schema/SchemasList.tsx | 17 +------------- 2 files changed, 13 insertions(+), 27 deletions(-) diff --git a/src/components/Ecosystem/MemberList.tsx b/src/components/Ecosystem/MemberList.tsx index 76784ba2d..2ab2656df 100644 --- a/src/components/Ecosystem/MemberList.tsx +++ b/src/components/Ecosystem/MemberList.tsx @@ -30,22 +30,23 @@ const MemberList = () => { const { data } = response as AxiosResponse; if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { const totalPages = data?.data?.totalPages; - - const compareMembers=( - firstMember: { ecosystemRole: { name: string; }; }, + + const compareMembers = ( + firstMember: { ecosystemRole: { name: string; }; }, secondMember: { ecosystemRole: { name: string; }; } - )=> { + ) => { const firstName = firstMember?.ecosystemRole?.name; const secondName = secondMember?.ecosystemRole?.name; - if (firstName > secondName) { - return 1; - } else if (secondName > firstName) { - return -1; - } else { - return 0; + switch (true) { + case firstName > secondName: + return 1; + case secondName > firstName: + return -1; + default: + return 0; } - } + }; const sortedMemberList = data?.data?.members?.sort(compareMembers) const membersData = sortedMemberList?.map( (member: { diff --git a/src/components/Resources/Schema/SchemasList.tsx b/src/components/Resources/Schema/SchemasList.tsx index bab46673f..2406d5d9a 100644 --- a/src/components/Resources/Schema/SchemasList.tsx +++ b/src/components/Resources/Schema/SchemasList.tsx @@ -271,9 +271,7 @@ const SchemaList = (props: { schemaSelectionCallback: (schemaId: string, schemaD
) : ( -
- {walletStatus ? - - : - - - } - onClick={() => { - window.location.href = `${pathRoutes.organizations.dashboard}?OrgId=${orgId}` - }} - />} -
) }