diff --git a/public/images/dark-dpg-alliance.svg b/public/images/dark-dpg-alliance.svg new file mode 100644 index 000000000..5c8ffb092 --- /dev/null +++ b/public/images/dark-dpg-alliance.svg @@ -0,0 +1,51 @@ + + + + + + + + + + diff --git a/public/images/mobile_mockup.svg b/public/images/mobile_mockup.svg index 74df5c322..29d965cde 100644 --- a/public/images/mobile_mockup.svg +++ b/public/images/mobile_mockup.svg @@ -1,9 +1,9 @@ - - + + - + - + diff --git a/src/api/issuance.ts b/src/api/issuance.ts index e502b364d..cce5d83fe 100644 --- a/src/api/issuance.ts +++ b/src/api/issuance.ts @@ -1,4 +1,3 @@ -import axios from 'axios'; import { apiRoutes } from '../config/apiRoutes'; import { storageKeys } from '../config/CommonConstant'; import { @@ -14,8 +13,8 @@ export const getIssuedCredentials = async ({page, sortBy, sortingOrder}: IConnectionListAPIParameter) => { const orgId = await getFromLocalStorage(storageKeys.ORG_ID); - const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Issuance.getIssuedCredentials}?pageSize=${itemPerPage}&pageNumber=${page}&searchByText=${search}&sortByValue=${sortingOrder}&sorting=${sortBy}`; - + const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Issuance.getIssuedCredentials}?pageSize=${itemPerPage}&pageNumber=${page}&searchByText=${search}&sortBy=${sortingOrder}&sortField=${sortBy}`; + const axiosPayload = { url, config: await getHeaderConfigs(), diff --git a/src/commonComponents/PublicNavbar.astro b/src/commonComponents/PublicNavbar.astro index b4a74b0e6..d5344d791 100644 --- a/src/commonComponents/PublicNavbar.astro +++ b/src/commonComponents/PublicNavbar.astro @@ -68,13 +68,13 @@ const navbarClass = `bg-white dark:bg-gray-900 w-full z-20 top-0 left-0 border-g Documentation Explore Organizations @@ -84,7 +84,7 @@ const navbarClass = `bg-white dark:bg-gray-900 w-full z-20 top-0 left-0 border-g > Sign Up diff --git a/src/commonComponents/SchemaCard.tsx b/src/commonComponents/SchemaCard.tsx index 6663c9575..9a7c15da4 100644 --- a/src/commonComponents/SchemaCard.tsx +++ b/src/commonComponents/SchemaCard.tsx @@ -10,15 +10,20 @@ interface IProps { issuerDid: string, attributes: [], created: string, + isClickable?: boolean onClickCallback: (schemaId: string, attributes: string[], issuerDid: string, created: string) => void; + limitedAttributes?: boolean } const SchemaCard = (props: IProps) => { + + const attributes = props.limitedAttributes !== false ? props?.attributes?.slice(0, 3) : props?.attributes + return ( { props.onClickCallback(props.schemaId, props.attributes, props.issuerDid, props.created) }} id="schema-cards" - className='transform transition duration-500 hover:scale-105 hover:bg-gray-50 cursor-pointer h-full w-full overflow-hidden'> + className={`transform transition duration-500 ${props.isClickable !== false ? "hover:scale-105" : "hover:!cursor-default"} hover:bg-gray-50 cursor-pointer h-full w-full overflow-hidden`}>
@@ -55,10 +60,10 @@ const SchemaCard = (props: IProps) => { Attributes:
- {props.attributes && props.attributes.length > 0 && ( + {attributes && attributes.length > 0 && ( <> - {props?.attributes?.slice(0, 3).map((element, index) => ( -
+ {attributes?.map((element) => ( +
{
))} - {props?.attributes?.length > 3 && ...} + {props?.limitedAttributes !== false && props?.attributes?.length > 3 && ...} )}
diff --git a/src/components/ColorModeSwitcher.astro b/src/components/ColorModeSwitcher.astro index b06580d22..f7765624f 100644 --- a/src/components/ColorModeSwitcher.astro +++ b/src/components/ColorModeSwitcher.astro @@ -38,9 +38,10 @@ diff --git a/src/components/Ecosystem/EcosystemList.tsx b/src/components/Ecosystem/EcosystemList.tsx index df9b52683..e20dd6105 100644 --- a/src/components/Ecosystem/EcosystemList.tsx +++ b/src/components/Ecosystem/EcosystemList.tsx @@ -34,6 +34,7 @@ const initialPageState = { const EcosystemList = () => { const [openModal, setOpenModal] = useState(false); const [loading, setLoading] = useState(true); + const [selectedOrgId, setSelectedOrgId] = useState(""); const [message, setMessage] = useState(null); const [error, setError] = useState(null); const [currentPage, setCurrentPage] = useState(initialPageState); @@ -55,9 +56,9 @@ const EcosystemList = () => { }; const fetchEcosystems = async () => { - setLoading(true); const id = await getFromLocalStorage(storageKeys.ORG_ID); - // setOrgId(id); + setSelectedOrgId(id) + setLoading(true); if (id) { const response = await getEcosystems( id, @@ -70,7 +71,7 @@ const EcosystemList = () => { if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { const ecosystemData = data?.data; if (ecosystemData) { - + setEcosystemList(ecosystemData); } else { await removeFromLocalStorage(storageKeys.ECOSYSTEM_ID); @@ -132,9 +133,9 @@ const EcosystemList = () => { const isEcosystemList = Boolean(ecosystemList && ecosystemList?.length > 0); const showCreateButton = Boolean( isEcosystemList && - (isEcosystemData?.isMultiEcosystem || isEcosystemData?.isEcosystemLead), + (isEcosystemData?.isMultiEcosystem || isEcosystemData?.isEcosystemLead), ); - + return (
@@ -145,10 +146,10 @@ const EcosystemList = () => { Ecosystems
- -
+ +
{showCreateButton && ( { )}
-
- +
+ { ); })}
- + ) : ( - ecosystemList && ( - - - - } - /> - ) + <> + {ecosystemList && ( + + + + } + /> + )} + { + !selectedOrgId && + + + + } + /> + } + + )}
{isEcosystemList && ecosystemList && ecosystemList?.length > 10 && ( { setMessage(value); if (value) { setTimeout(() => { - window.location.reload(); + window.location.reload(); }, 2000); } else { fetchEcosystems(); @@ -317,6 +344,6 @@ const EcosystemList = () => {
-) + ) } export default EcosystemList; diff --git a/src/components/EcosystemInvite/EcoInvitationList.tsx b/src/components/EcosystemInvite/EcoInvitationList.tsx index e60f182af..384f7773a 100644 --- a/src/components/EcosystemInvite/EcoInvitationList.tsx +++ b/src/components/EcosystemInvite/EcoInvitationList.tsx @@ -1,9 +1,10 @@ -import type { InvitationProps } from "./EcoSystemReceivedInvitations"; +import type { InvitationProps, NetworkDetails } from "./EcoSystemReceivedInvitations"; import CustomAvatar from '../Avatar'; +import React from "react"; const EcoInvitationList = (props: InvitationProps) => { - const { invitationId, ecosystem } = props; - const { name, logoUrl, networkDetails } = ecosystem; + const { invitationId, ecosystem } = props || {}; + const { name, logoUrl, networkDetails } = ecosystem || {}; return (
@@ -32,20 +33,22 @@ const EcoInvitationList = (props: InvitationProps) => { > Ecosystem Member -
+
- +
Network:{' '} - - {(Array.isArray(networkDetails) && networkDetails.map((network: NetworkDetails) => network.name)).join(', ')} - -
+ {Array.isArray(networkDetails) && networkDetails.length > 0 && + + {networkDetails.map((network: NetworkDetails) => network.name)?.join(', ')} + + } + ); diff --git a/src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx b/src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx index 80f964dfd..6c63f8721 100644 --- a/src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx +++ b/src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx @@ -35,13 +35,14 @@ export interface NetworkDetails { indyNamespace: string; } +export interface IPropsEcoInvitationList { + name: string; + logoUrl: string; + networkDetails?: NetworkDetails[] +} export interface InvitationProps { invitationId: string; - ecosystem: { - name: string; - logoUrl: string; - networkDetails: NetworkDetails[] - }; + ecosystem: IPropsEcoInvitationList; } export interface EcosystemInvitation { ecosystem: { name: string; logoUrl: string }; @@ -315,99 +316,102 @@ const ReceivedInvitations = () => { >
- {invitation.selected && ( - { - setGetOrgError(null); - }} - /> - )} - - ))} + {invitation.selected && ( + { + setGetOrgError(null); + }} + /> + )} + + ) + })} diff --git a/src/components/Issuance/CredDefSelection.tsx b/src/components/Issuance/CredDefSelection.tsx index d494f8c6c..e4d9f1e94 100644 --- a/src/components/Issuance/CredDefSelection.tsx +++ b/src/components/Issuance/CredDefSelection.tsx @@ -163,6 +163,8 @@ const CredDefSelection = () => { attributes={schemaDetailsState.attributes} created={schemaDetailsState.createdDateTime} onClickCallback={schemaSelectionCallback} + isClickable={false} + limitedAttributes={false} /> )} diff --git a/src/components/Issuance/IssueDashboard.tsx b/src/components/Issuance/IssueDashboard.tsx index 5669c366d..eb674e996 100644 --- a/src/components/Issuance/IssueDashboard.tsx +++ b/src/components/Issuance/IssueDashboard.tsx @@ -25,21 +25,21 @@ const IssueDashboard = () => { }, ]; return ( -
-
+
+
-
-
-

+
+

Issue Credential

-

+ +

+
+

Select the appropriate action for issuing credential(s){' '}

-
-
-
+
{options.map((option) => ( { } finally { setLoading(false); } - } + }; useEffect(() => { - getIssuedCredDefs(listAPIParameter); + let getData: NodeJS.Timeout; + + if (listAPIParameter?.search?.length >= 1) { + getData = setTimeout(() => { + getIssuedCredDefs(listAPIParameter); + }, 1000); + return () => clearTimeout(getData); + } else { + getIssuedCredDefs(listAPIParameter); + } + return () => clearTimeout(getData); }, [listAPIParameter]); //onChange of Search input text @@ -218,7 +228,7 @@ const CredentialList = () => { {walletCreated && ( {
- ) : issuedCredList && issuedCredList.length > 0 ? ( + ) : (
- {issuedCredList && issuedCredList.length > 0 && ( + {issuedCredList && issuedCredList.length > 0 ? ( + ) : ( + )}
{Math.ceil(totalItem / listAPIParameter?.itemPerPage) > 1 && ( @@ -293,12 +308,6 @@ const CredentialList = () => {
)}
- ) : ( -
- - There isn't any data available. - -
)}
)} diff --git a/src/components/RoleViewButton/index.tsx b/src/components/RoleViewButton/index.tsx index 053b6c819..803b76f26 100644 --- a/src/components/RoleViewButton/index.tsx +++ b/src/components/RoleViewButton/index.tsx @@ -33,7 +33,7 @@ const RoleViewButton = ({ buttonTitle, svgComponent, onClickEvent, feature, isOu if (feature === Features.CRETAE_ORG) { return true - } else if (feature === Features.ISSUENCE) { + } else if (feature === Features.ISSUANCE) { if (userRoles.includes(Roles.OWNER) || userRoles.includes(Roles.ADMIN) || userRoles.includes(Roles.ISSUER) diff --git a/src/components/User/UserDashBoard.tsx b/src/components/User/UserDashBoard.tsx index 90c3a3006..dd10c6e4e 100644 --- a/src/components/User/UserDashBoard.tsx +++ b/src/components/User/UserDashBoard.tsx @@ -170,7 +170,7 @@ const UserDashBoard = () => {
{ Close modal -
+

Verified Details

diff --git a/src/components/Verification/VerificationCredentialList.tsx b/src/components/Verification/VerificationCredentialList.tsx index 3c600eccd..116a426df 100644 --- a/src/components/Verification/VerificationCredentialList.tsx +++ b/src/components/Verification/VerificationCredentialList.tsx @@ -285,7 +285,6 @@ const VerificationCredentialList = () => { getproofRequestList(listAPIParameter); }; - const requestProof = async (proofVericationId: string) => { if (proofVericationId) { setOpenModal(false); @@ -294,7 +293,17 @@ const VerificationCredentialList = () => { }; useEffect(() => { - getproofRequestList(listAPIParameter); + let getData: NodeJS.Timeout; + + if (listAPIParameter?.search?.length >= 1) { + getData = setTimeout(() => { + getproofRequestList(listAPIParameter); + }, 1000); + return () => clearTimeout(getData); + } else { + getproofRequestList(listAPIParameter); + } + return () => clearTimeout(getData); }, [listAPIParameter]); const schemeSelection = () => { @@ -424,11 +433,10 @@ const VerificationCredentialList = () => { )}
) : ( -
- - There isn't any data available. - -
+ )}
)} diff --git a/src/components/organization/invitations/Invitations.tsx b/src/components/organization/invitations/Invitations.tsx index b3a420bee..4d8c05a24 100644 --- a/src/components/organization/invitations/Invitations.tsx +++ b/src/components/organization/invitations/Invitations.tsx @@ -233,9 +233,11 @@ const Invitations = () => {
- Invited On:  {dateConversion(invitation.createDateTime)} + Invited On:  
+ {dateConversion(invitation.createDateTime)} +
{invitation.status === 'pending' && (
diff --git a/src/components/organization/invitations/SendInvitationModal.tsx b/src/components/organization/invitations/SendInvitationModal.tsx index e6f2df6c8..cbbb5aa85 100644 --- a/src/components/organization/invitations/SendInvitationModal.tsx +++ b/src/components/organization/invitations/SendInvitationModal.tsx @@ -46,7 +46,7 @@ const SendInvitationModal = (props: { const [invitations, setInvitations] = useState([]); const [memberRole, setMemberRole] = useState(null); - + const [initialData, setInitialData] = useState({ email: '', }); @@ -106,7 +106,7 @@ const SendInvitationModal = (props: { email: invitation.email, orgRoleId: [invitation.roleId], }; - }); + }); const resCreateOrg = await createInvitations(invitationPayload); const { data } = resCreateOrg as AxiosResponse; @@ -187,6 +187,7 @@ const SendInvitationModal = (props: { .string() .required('Email is required') .email('Email is invalid') + .test('is-self-email', "You can't send invitation to self", (value) => value.trim() !== selfEmail.email.trim()) .trim(), })} validateOnBlur @@ -196,17 +197,6 @@ const SendInvitationModal = (props: { values: Values, { resetForm }: FormikHelpers, ) => { - if(values.email === selfEmail.email){ - setSelfEmail({ - ...selfEmail, - error: "You can't send invitation to self." - }) - return - } - setSelfEmail({ - ...selfEmail, - error: "" - }) await includeInvitation(values); resetForm({ values: initialInvitationData }); }} @@ -226,23 +216,13 @@ const SendInvitationModal = (props: { id="email" name="email" className="bg-gray-50 border border-gray-300 text-gray-900 sm:text-sm rounded-lg focus:ring-primary-500 focus:border-primary-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-primary-500 dark:focus:border-primary-500" - onChange={(e) => { - formikHandlers.handleChange(e) - }} /> {formikHandlers?.errors?.email && formikHandlers?.touched?.email ? ( {formikHandlers?.errors?.email} - ) : selfEmail.error ? - - {selfEmail.error} - - : - ( - Error - )} + ) : Error}
diff --git a/src/components/organization/users/EditUserRolesModal.tsx b/src/components/organization/users/EditUserRolesModal.tsx index 544ab0c43..f6df63db7 100644 --- a/src/components/organization/users/EditUserRolesModal.tsx +++ b/src/components/organization/users/EditUserRolesModal.tsx @@ -31,7 +31,7 @@ const EditUserRoleModal = (props: { openModal: boolean; user: User; setMessage: if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) { - const roles: Array = data?.data.response + const roles: Array = data?.data const filterRole = roles.filter(role => { if (props?.user?.roles.includes(role.name) && role.name !== 'member') { role.checked = true @@ -44,7 +44,7 @@ const EditUserRoleModal = (props: { openModal: boolean; user: User; setMessage: role.disabled = false } return !role.name.includes("owner") && !role.name.includes("holder"); - }) + }) setRoles(filterRole) } else { setErrMsg(resRoles as string) diff --git a/src/components/organization/users/Members.tsx b/src/components/organization/users/Members.tsx index 84f8db327..131d862bc 100644 --- a/src/components/organization/users/Members.tsx +++ b/src/components/organization/users/Members.tsx @@ -13,7 +13,7 @@ import SearchInput from '../../SearchInput'; import type { User } from '../interfaces/users'; import { getFromLocalStorage } from '../../../api/Auth'; import { getOrganizationUsers } from '../../../api/organization'; -import React from 'react'; +import { EmptyListMessage } from '../../EmptyListComponent'; const initialPageState = { pageNumber: 1, @@ -23,7 +23,7 @@ const initialPageState = { const Members = () => { const [openModal, setOpenModal] = useState(false); - const [loading, setLoading] = useState(false); + const [loading, setLoading] = useState(true); const [message, setMessage] = useState(null); const [error, setError] = useState(null); const [userRoles, setUserRoles] = useState([]); @@ -63,11 +63,6 @@ const Members = () => { userOrg.roles = roles; return userOrg; }); - - if (usersList.length === 0) { - setError('No Data Found'); - } - setUsersList(usersList); setCurrentPage({ ...currentPage, @@ -76,13 +71,11 @@ const Members = () => { } else { setError(response as string); } - setLoading(false); }; //This useEffect is called when the searchText changes useEffect(() => { - let getData: NodeJS.Timeout; if (searchText.length >= 1) { @@ -124,35 +117,32 @@ const Members = () => {
- setMessage(data)} - setOpenModal={props.setOpenModal} - /> + setMessage(data)} + setOpenModal={props.setOpenModal} + /> - { - setMessage(null); - setError(null); - }} - /> - {loading ? ( -
- -
- ) : ( - usersList && - usersList?.length > 0 && ( + { + setMessage(null); + setError(null); + }} + /> + {loading ? ( +
+ +
+ ) : usersList && usersList?.length > 0 ? (
    {usersList.map((user) => ( -
  • +
  • @@ -165,7 +155,9 @@ const Members = () => {
  • - {user.roles.length>1 ? 'Roles:' : 'Role:'} + {user.roles.length > 1 + ? 'Roles:' + : 'Role:'} {user.roles && user.roles.length > 0 && user.roles.map( @@ -243,18 +235,22 @@ const Members = () => {
- ) - )} - {currentPage.total > 1 && ( -
- -
- )} -
+ )} + {currentPage.total > 1 && ( +
+ +
+ )} +
); }; diff --git a/src/components/publicProfile/OrganisationPublicProfile.tsx b/src/components/publicProfile/OrganisationPublicProfile.tsx index bb908173e..b2aa4537c 100644 --- a/src/components/publicProfile/OrganisationPublicProfile.tsx +++ b/src/components/publicProfile/OrganisationPublicProfile.tsx @@ -119,28 +119,22 @@ const OrganisationPublicProfile = () => { }} className="transform transition duration-500 hover:scale-[1.02] hover:bg-gray-50 cursor-pointer" > -
- {org.logoUrl ? ( - - ) : ( - - )} +
+
+ {org.logoUrl ? ( + + ) : ( + + )} +
-

{org?.name}

+ {org?.name}
-
-
    -
  • -
    -
    - {org?.description} -
    -
    -
  • -
-
+

+ {org?.description} +

diff --git a/src/pages/index.astro b/src/pages/index.astro index 71dd88b2f..bb26cbeb7 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -91,13 +91,20 @@ import { pathRoutes } from '../config/pathRoutes'; >has been recognized by
- + +

@@ -1241,7 +1248,7 @@ import { pathRoutes } from '../config/pathRoutes';