diff --git a/src/api/invitations.ts b/src/api/invitations.ts index 4611f9922..47bfbd2d5 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/commonComponents/backbutton/index.tsx b/src/commonComponents/backbutton/index.tsx new file mode 100644 index 000000000..9620bc229 --- /dev/null +++ b/src/commonComponents/backbutton/index.tsx @@ -0,0 +1,34 @@ +import { Button } from 'flowbite-react'; + +const index = ({ path }: { path: string }) => { + return ( +
+ +
+ ); +}; + +export default index; diff --git a/src/commonComponents/datatable/index.tsx b/src/commonComponents/datatable/index.tsx index ffea60152..cb89d899e 100644 --- a/src/commonComponents/datatable/index.tsx +++ b/src/commonComponents/datatable/index.tsx @@ -31,6 +31,7 @@ const DataTable: React.FC = ({ header,displaySelect, data, loadi {header && header.length > 0 && header.map(ele => ( @@ -44,10 +45,10 @@ const DataTable: React.FC = ({ header,displaySelect, data, loadi {data.length ? data.map((ele, index) => ( - + {ele.data.map(subEle => ( - +
{subEle.data}
{subEle.subData && subEle.subData} diff --git a/src/components/CreateEcosystemOrgModal/index.tsx b/src/components/CreateEcosystemOrgModal/index.tsx index 9e02683e2..5ebda9078 100644 --- a/src/components/CreateEcosystemOrgModal/index.tsx +++ b/src/components/CreateEcosystemOrgModal/index.tsx @@ -235,11 +235,14 @@ const CreateEcosystemOrgModal = (props: IProps) => { return ( { setLogoImage({ - logoFile: "", - imagePreviewUrl: "", - fileName: '' + logoFile: " ", + imagePreviewUrl: " ", + fileName: ' ' + }) + setFormData({ + name:" ", + description:" " }) - setFormData(initialFormData) props.setOpenModal(false) } }> @@ -267,8 +270,8 @@ const CreateEcosystemOrgModal = (props: IProps) => { values: Values, { resetForm }: FormikHelpers ) => { - submit(values) + resetForm(); }} > diff --git a/src/components/Ecosystem/Dashboard.tsx b/src/components/Ecosystem/Dashboard.tsx index 3e5a9762f..c4d678d58 100644 --- a/src/components/Ecosystem/Dashboard.tsx +++ b/src/components/Ecosystem/Dashboard.tsx @@ -391,12 +391,12 @@ const Dashboard = () => { >
Edit Ecosystem
- + {/*
Enable/Disable Ecosystem
-
- + */} + {/*
Manual Registration
-
+
*/} ) : ( { + { props.closeModal() setErrMsg(null) }} size="xl"> {isEcosystemData?.isEcosystemLead ? ( -
Requested {props.endorsementData?.type}
+
Requested {props.endorsementData?.type === EndorsementType.credDef ? "Credential Definition" : "Schema" }
) : ( -
View {props.endorsementData?.type}
+
View {props.endorsementData?.type === EndorsementType.credDef ? "Credential Definition" : "Schema"}
)}
diff --git a/src/components/Ecosystem/MemberList.tsx b/src/components/Ecosystem/MemberList.tsx index a7d815a8a..34697db79 100644 --- a/src/components/Ecosystem/MemberList.tsx +++ b/src/components/Ecosystem/MemberList.tsx @@ -7,7 +7,8 @@ import type { TableData } from '../../commonComponents/datatable/interface'; import DateTooltip from '../Tooltip'; import { dateConversion } from '../../utils/DateConversion'; import { AlertComponent } from '../AlertComponent'; -import { Pagination } from 'flowbite-react'; +import { Button, Pagination } from 'flowbite-react'; +import { pathRoutes } from '../../config/pathRoutes'; const initialPageState = { pageNumber: 1, @@ -31,22 +32,23 @@ const MemberList = () => { if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { const totalPages = data?.data?.totalPages; - const compareMembers=( - firstMember: { ecosystemRole: { name: string; }; }, - secondMember: { 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 sortedMemberList = data?.data?.members?.sort(compareMembers); const membersData = sortedMemberList?.map( (member: { ecosystemRole: { name: string }; @@ -58,13 +60,15 @@ const MemberList = () => { return { data: [ { - data: member.orgName || 'Not avilable', + data: member.orgName || 'Not available', }, { - data: - {dateConversion(member?.createDateTime)}{' '} - - || 'Not available' + data: + ( + + {dateConversion(member?.createDateTime)}{' '} + + ) || 'Not available', }, { data: member.ecosystemRole.name ? ( @@ -78,7 +82,7 @@ const MemberList = () => { {member.ecosystemRole.name} ) : ( - 'Not avilable' + 'Not available' ), }, { @@ -93,7 +97,7 @@ const MemberList = () => { {member.status} ) : ( - 'Not avilable' + 'Not available' ), }, { @@ -126,8 +130,6 @@ const MemberList = () => { setLoading(false); }; - - const onPageChange = (page: number) => { setCurrentPage({ ...currentPage, @@ -156,12 +158,35 @@ const MemberList = () => {

Ecosystem Members

- { + window.location.href = `${pathRoutes.ecosystem.sentinvitation}`; + }} + className="bg-secondary-700 ring-primary-700 bg-white-700 hover:bg-secondary-700 + ring-2 text-black font-medium rounded-lg text-sm + ml-auto dark:text-white dark:hover:text-black + dark:hover:bg-primary-50" > - Sent Invitations - + + + + Sent Invitations +
{ loading={loading} > - {currentPage.pageNumber > 1 && ( + {currentPage.total > 1 && (
{
- +

Received Ecosystem Invitations @@ -379,7 +365,7 @@ const ReceivedInvitations = () => { ) )} - {currentPage.pageNumber > 1 &&
+ {currentPage.total > 1 &&
{
)} - {currentPage.pageNumber >1 && ( + {currentPage.total > 1 && (
{ const [selectedConnectionList, setSelectedConnectionList] = useState([]) @@ -36,23 +38,7 @@ const Connections = () => {
- +
diff --git a/src/components/Issuance/CredDefSelection.tsx b/src/components/Issuance/CredDefSelection.tsx index 5778e8b74..1e835f1a9 100644 --- a/src/components/Issuance/CredDefSelection.tsx +++ b/src/components/Issuance/CredDefSelection.tsx @@ -17,6 +17,8 @@ import { dateConversion } from "../../utils/DateConversion"; import { getCredentialDefinitions } from "../../api/issuance"; import { pathRoutes } from "../../config/pathRoutes"; import DateTooltip from "../Tooltip"; +import BackButton from '../../commonComponents/backbutton' + const CredDefSelection = () => { const [schemaState, setSchemaState] = useState({ schemaName: '', version: '' }) @@ -64,7 +66,6 @@ const CredDefSelection = () => { { columnName: ' ' } ] - //Fetch credential definitions against schemaId const getCredDefs = async (schemaId: string) => { setLoading(true) const response = await getCredentialDefinitions(schemaId); @@ -109,20 +110,7 @@ const CredDefSelection = () => {
- +

@@ -145,7 +133,6 @@ const CredDefSelection = () => {

Credential definitions

- {/*
*/} - {/*
*/}
{
- +

Issuance diff --git a/src/components/Resources/Schema/Create.tsx b/src/components/Resources/Schema/Create.tsx index b9b901de8..72b1a9e0a 100644 --- a/src/components/Resources/Schema/Create.tsx +++ b/src/components/Resources/Schema/Create.tsx @@ -452,7 +452,7 @@ const CreateSchema = () => { )} {index === attribute.length - 1 && ( -
+
diff --git a/src/components/Resources/Schema/ViewSchema.tsx b/src/components/Resources/Schema/ViewSchema.tsx index fcc28fd1d..faf0f9d63 100644 --- a/src/components/Resources/Schema/ViewSchema.tsx +++ b/src/components/Resources/Schema/ViewSchema.tsx @@ -6,7 +6,7 @@ import { apiStatusCodes, storageKeys } from '../../../config/CommonConstant'; import { createCredentialDefinition, getCredDeffById, getSchemaById } from '../../../api/Schema'; import { getFromLocalStorage, setToLocalStorage } from '../../../api/Auth'; import { useEffect, useState } from 'react'; - +import BackButton from '../../../commonComponents/backbutton' import type { AxiosResponse } from 'axios'; import BreadCrumbs from '../../BreadCrumbs'; import CredDeffCard from '../../../commonComponents/CredentialDefinitionCard'; @@ -206,26 +206,8 @@ const ViewSchemas = () => {

Schemas

- +
-

{ const [selectedConnectionList, setSelectedConnectionList] = useState([]) @@ -35,20 +36,7 @@ const Connections = () => {
- +
diff --git a/src/components/Verification/CredDefSelection.tsx b/src/components/Verification/CredDefSelection.tsx index 1cf930749..c70005aff 100644 --- a/src/components/Verification/CredDefSelection.tsx +++ b/src/components/Verification/CredDefSelection.tsx @@ -14,6 +14,7 @@ import type { TableData } from "../../commonComponents/datatable/interface"; import DataTable from "../../commonComponents/datatable"; import { getCredentialDefinitionsForVerification } from "../../api/verification"; import CustomSpinner from "../CustomSpinner"; +import BackButton from '../../commonComponents/backbutton' const CredDefSelection = () => { const [schemaState, setSchemaState] = useState({ schemaName: '', version: '' }) @@ -63,7 +64,6 @@ const CredDefSelection = () => { { columnName: 'check' } ] - //Fetch credential definitions against schemaId const getCredDefs = async (schemaId: string) => { setLoading(true) const response = await getCredentialDefinitionsForVerification(schemaId,31); @@ -125,20 +125,7 @@ const CredDefSelection = () => {
- +

Schema diff --git a/src/components/Verification/Verification.tsx b/src/components/Verification/Verification.tsx index 6279c1a79..9a0f0981c 100644 --- a/src/components/Verification/Verification.tsx +++ b/src/components/Verification/Verification.tsx @@ -11,6 +11,7 @@ import type { TableData } from "../../commonComponents/datatable/interface"; import { verifyCredential } from "../../api/verification"; import { pathRoutes } from "../../config/pathRoutes"; import CustomSpinner from "../CustomSpinner"; +import BackButton from '../../commonComponents/backbutton' interface SchemaDetails { schemaName: string, @@ -198,20 +199,7 @@ const VerificationCred = () => {
- +

Verification diff --git a/src/components/organization/EditOrgdetailsModal.tsx b/src/components/organization/EditOrgdetailsModal.tsx index 3f6563962..997179817 100644 --- a/src/components/organization/EditOrgdetailsModal.tsx +++ b/src/components/organization/EditOrgdetailsModal.tsx @@ -136,9 +136,7 @@ const EditOrgdetailsModal = (props: EditOrgdetailsModalProps) => { setIsImageEmpty(true) return true } - - - const handleImageChange = (event: any): void => { + const handleImageChange = (event: any): void => { setImgError('') const reader = new FileReader() const file = event?.target?.files @@ -268,8 +266,6 @@ const EditOrgdetailsModal = (props: EditOrgdetailsModalProps) => { alt="Jese picture" /> } - -

Organization Logo @@ -320,7 +316,6 @@ const EditOrgdetailsModal = (props: EditOrgdetailsModalProps) => {

-
{ onChange={() => setIsPublic(false)} id="private" name="private" - /> - Private - Only the connected organization can see you organization details - + />PrivateOnly the connected organization can see your organization details
{ id="public" name="public" /> - Public Your profile and organization details can be seen by everyone
-