From 10155595c4e8fab88163b14db8d6fc59d6e2dbb2 Mon Sep 17 00:00:00 2001 From: bhavanakarwade Date: Fri, 24 Jan 2025 19:28:06 +0530 Subject: [PATCH 1/3] fix: search bar not working (#881) * fix: schema route changes Signed-off-by: bhavanakarwade * fix: refactor dev deploy yml file Signed-off-by: bhavanakarwade * fix: refactor dev yml file Signed-off-by: bhavanakarwade * fix: refactor domains in yml file Signed-off-by: bhavanakarwade * fix: added validations for condition and values of predicates Signed-off-by: bhavanakarwade * fix: unable to send proof request using connection issue Signed-off-by: bhavanakarwade * fix: remove unnecessary code Signed-off-by: bhavanakarwade * fix: search bar issue throughout the application Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade --- .../datatable/SortDataTable.tsx | 3 +- src/commonComponents/datatable/interface.ts | 1 + src/components/Issuance/IssuedCrdentials.tsx | 4 +- .../Resources/Schema/SchemasList.tsx | 2 +- .../VerificationCredentialList.tsx | 3 + .../organization/OrganizationsList.tsx | 103 ++++++++---------- .../organization/invitations/Invitations.tsx | 1 + src/components/organization/users/Members.tsx | 2 +- src/pages/index.astro | 8 +- 9 files changed, 58 insertions(+), 69 deletions(-) diff --git a/src/commonComponents/datatable/SortDataTable.tsx b/src/commonComponents/datatable/SortDataTable.tsx index 88cafe21d..9144493b3 100644 --- a/src/commonComponents/datatable/SortDataTable.tsx +++ b/src/commonComponents/datatable/SortDataTable.tsx @@ -8,6 +8,7 @@ import { EmptyListMessage } from '../../components/EmptyListComponent'; const SortDataTable: React.FC = ({ header, + searchValue, displaySelect, data, loading, @@ -91,7 +92,7 @@ const SortDataTable: React.FC = ({ {isSearch && ( - + )} diff --git a/src/commonComponents/datatable/interface.ts b/src/commonComponents/datatable/interface.ts index 7cd5870e6..4f7390c03 100644 --- a/src/commonComponents/datatable/interface.ts +++ b/src/commonComponents/datatable/interface.ts @@ -20,6 +20,7 @@ export interface Data { export interface IDataTable { header: TableHeader[]; + searchValue?: string; data: ITableData[]; loading: boolean; onInputChange: (e: ChangeEvent) => void; diff --git a/src/components/Issuance/IssuedCrdentials.tsx b/src/components/Issuance/IssuedCrdentials.tsx index cf2fde20e..cdecac4ed 100644 --- a/src/components/Issuance/IssuedCrdentials.tsx +++ b/src/components/Issuance/IssuedCrdentials.tsx @@ -46,7 +46,7 @@ const CredentialList = () => { lastPage: '', }); const [w3cSchema, setW3CSchema]= useState(false); - + const [searchText, setSearchText] = useState(""); const getIssuedCredDefs = async ( listAPIParameter: IConnectionListAPIParameter, @@ -204,6 +204,7 @@ const CredentialList = () => { //onChange of Search input text const searchInputChange = (e: ChangeEvent) => { + setSearchText(e.target.value) setListAPIParameter({ ...listAPIParameter, search: e.target.value, @@ -301,6 +302,7 @@ const CredentialList = () => { > => { event.preventDefault(); const inputValue = event.target.value; - setSearchValue(inputValue); + setSearchValue(inputValue.toLowerCase()); getSchemaList( { diff --git a/src/components/Verification/VerificationCredentialList.tsx b/src/components/Verification/VerificationCredentialList.tsx index 53eb93276..0d1234150 100644 --- a/src/components/Verification/VerificationCredentialList.tsx +++ b/src/components/Verification/VerificationCredentialList.tsx @@ -58,6 +58,7 @@ const VerificationCredentialList = () => { nextPage: '', lastPage: '', }); + const [searchText, setSearchText] = useState(""); const getProofPresentationData = async (proofId: string) => { try { @@ -85,6 +86,7 @@ const VerificationCredentialList = () => { }; const searchInputChange = (e: ChangeEvent) => { + setSearchText(e.target.value) setListAPIParameter({ ...listAPIParameter, search: e.target.value, @@ -410,6 +412,7 @@ const VerificationCredentialList = () => { > { await setToLocalStorage(storageKeys.ORG_ROLES, roles.toString()); window.location.href = pathRoutes.organizations.dashboard; }; + + const filteredOrganizations = organizationsList?.filter((org) => + org.name.toLowerCase().includes(searchText.toLowerCase()) + ); + let content: React.JSX.Element = <>; - if (organizationsList && organizationsList?.length > 0) { + + if (filteredOrganizations && filteredOrganizations.length > 0) { content = (
- {organizationsList.map((org) => ( + {filteredOrganizations.map((org) => ( redirectOrgDashboard(org)} @@ -142,77 +148,64 @@ const OrganizationsList = () => { maxWidth: '100%', overflow: 'auto', }} - > + >
- {org.logoUrl ? ( + /> ) : ( - + )} - -
+
{org?.name}

{org?.description}

-
-
    -
  • -
    -
    - Role(s): - {org.roles && - org.roles.length > 0 && - org.roles.map((role: string, index: number) => { - return ( - - {role.charAt(0).toUpperCase() + - role.slice(1)} - - ); - })} -
    -
    -
  • -
-
))}
-
- {currentPage.total > 1 && ( -
- -
- )} -
+ {currentPage.total > 1 && ( +
+ +
+ )}
); - } else { + } else if (searchText && filteredOrganizations?.length === 0) { content = ( + ); + } else if (!searchText && (!organizationsList || organizationsList.length === 0)) { + content = ( + { /> ); } + return (
@@ -245,7 +239,7 @@ const OrganizationsList = () => { Organizations
- +
= 10} @@ -278,15 +272,6 @@ const OrganizationsList = () => { setOpenModal={props.setOpenModal} isorgModal={true} /> - { organizationsList && { - setMessage(null); - setError(null); - }} - /> - } {loading ? (
diff --git a/src/components/organization/invitations/Invitations.tsx b/src/components/organization/invitations/Invitations.tsx index 42edd75df..1b999348c 100644 --- a/src/components/organization/invitations/Invitations.tsx +++ b/src/components/organization/invitations/Invitations.tsx @@ -122,6 +122,7 @@ const Invitations = () => {
{
- +
-
class="dark:text:white hover:opacity-50" -1149 -  +
-
class="dark:text:white hover:opacity-50" -1149 -  +
Date: Mon, 27 Jan 2025 14:51:52 +0530 Subject: [PATCH 2/3] fix: added search on connection list page (#884) * fix: schema route changes Signed-off-by: bhavanakarwade * fix: refactor dev deploy yml file Signed-off-by: bhavanakarwade * fix: refactor dev yml file Signed-off-by: bhavanakarwade * fix: refactor domains in yml file Signed-off-by: bhavanakarwade * fix: added validations for condition and values of predicates Signed-off-by: bhavanakarwade * fix: unable to send proof request using connection issue Signed-off-by: bhavanakarwade * fix: remove unnecessary code Signed-off-by: bhavanakarwade * fix: search bar issue throughout the application Signed-off-by: bhavanakarwade * fix: added search on connection list Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade --- src/components/ConnectionsList/index.tsx | 3 +++ src/components/Issuance/ConnectionList.tsx | 4 +++- src/components/Verification/ConnectionList.tsx | 4 +++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/src/components/ConnectionsList/index.tsx b/src/components/ConnectionsList/index.tsx index dc6505e5d..de1fbb91e 100644 --- a/src/components/ConnectionsList/index.tsx +++ b/src/components/ConnectionsList/index.tsx @@ -37,6 +37,7 @@ const ConnectionList = () => { nextPage: '', lastPage: '', }); + const [searchText, setSearchText] = useState(""); const getConnections = async (apiParameter: IConnectionListAPIParameter) => { const orgId = await getFromLocalStorage(storageKeys.ORG_ID); @@ -105,6 +106,7 @@ const ConnectionList = () => { //onChange of Search input text const searchInputChange = (e: ChangeEvent) => { + setSearchText(e.target.value) setListAPIParameter({ ...listAPIParameter, search: e.target.value, @@ -150,6 +152,7 @@ const ConnectionList = () => { )} ([]); const [connectionList, setConnectionList] = useState([]); const [localOrgs, setLocalOrgs] = useState([]); - + const [searchText, setSearchText] = useState(""); const [loading, setLoading] = useState(false); const [totalItem, setTotalItem] = useState(0); const [error, setError] = useState(null); @@ -188,6 +188,7 @@ const ConnectionList = (props: { //onChange of Search input text const searchInputChange = (e: ChangeEvent) => { + setSearchText(e.target.value) setListAPIParameter({ ...listAPIParameter, search: e.target.value, @@ -278,6 +279,7 @@ const ConnectionList = (props: { /> ([]); const [connectionsTableData, setConnectionsTableData] = useState([]); const [localOrgs, setLocalOrgs] = useState([]); - + const [searchText, setSearchText] = useState(""); const [selectedConnectionList, setSelectedConnectionList] = useState< ITableData[] >([]); @@ -66,6 +66,7 @@ const ConnectionList = (props: { }, [listAPIParameter]); const searchInputChange = (e: ChangeEvent) => { + setSearchText(e.target.value) setListAPIParameter({ ...listAPIParameter, search: e.target.value, @@ -299,6 +300,7 @@ const extractConnectionFields = (item: IConnectionList) => { /> Date: Mon, 27 Jan 2025 16:10:12 +0530 Subject: [PATCH 3/3] chore: domain related changes in yml file (#885) * fix: schema route changes Signed-off-by: bhavanakarwade * fix: refactor dev deploy yml file Signed-off-by: bhavanakarwade * fix: refactor dev yml file Signed-off-by: bhavanakarwade * fix: refactor domains in yml file Signed-off-by: bhavanakarwade * fix: added validations for condition and values of predicates Signed-off-by: bhavanakarwade * fix: unable to send proof request using connection issue Signed-off-by: bhavanakarwade * fix: remove unnecessary code Signed-off-by: bhavanakarwade * fix: search bar issue throughout the application Signed-off-by: bhavanakarwade * fix: added search on connection list Signed-off-by: bhavanakarwade * chore: did domain related changes in yml file Signed-off-by: bhavanakarwade * fix: added roles for orglist Signed-off-by: bhavanakarwade --------- Signed-off-by: bhavanakarwade --- .github/workflows/deploy-qa.yml | 8 +++---- .../organization/OrganizationsList.tsx | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/.github/workflows/deploy-qa.yml b/.github/workflows/deploy-qa.yml index a9ca4a4d7..3e4be1a81 100644 --- a/.github/workflows/deploy-qa.yml +++ b/.github/workflows/deploy-qa.yml @@ -52,15 +52,15 @@ jobs: echo "PUBLIC_POLYGON_TESTNET_URL=https://rpc-amoy.polygon.technology" >> .env - echo "PUBLIC_ECOSYSTEM_FRONT_END_URL=https://qa-ecosystem.credebl.id" >> .env + echo "PUBLIC_ECOSYSTEM_FRONT_END_URL=https://qa-ecosystem.sovio.id" >> .env - echo "PUBLIC_CREDEBL_FRONT_END_URL=https://qa.credebl.id" >> .env + echo "PUBLIC_CREDEBL_FRONT_END_URL=https://qa.sovio.id" >> .env echo "PUBLIC_ECOSYSTEM_BASE_URL=${{ secrets.QA_PUBLIC_ECOSYSTEM_BASE_URL }}" >> .env echo "PUBLIC_PLATFORM_DISCORD_URL=https://discord.gg/w4hnQT7NJG" >> .env - echo "PUBLIC_REDIRECTION_TARGET_URL=https://social-share.credebl.id" >> .env + echo "PUBLIC_REDIRECTION_TARGET_URL=https://social-share.sovio.id" >> .env echo "PUBLIC_CRYPTO_PRIVATE_KEY=${{ secrets.QA_PUBLIC_CRYPTO_PRIVATE_KEY }}" >> .env @@ -68,7 +68,7 @@ jobs: echo "PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRET=${{ secrets.QA_PUBLIC_KEYCLOAK_MANAGEMENT_CLIENT_SECRET }}" >> .env - echo "PUBLIC_REDIRECT_FROM_URL=https://qa.credebl.id" >> .env + echo "PUBLIC_REDIRECT_FROM_URL=https://qa.sovio.id" >> .env - name: Build step run: npm install && npm run build # 📝 Update the build command(s) diff --git a/src/components/organization/OrganizationsList.tsx b/src/components/organization/OrganizationsList.tsx index 26a3f0625..058fdb46d 100644 --- a/src/components/organization/OrganizationsList.tsx +++ b/src/components/organization/OrganizationsList.tsx @@ -174,6 +174,30 @@ const OrganizationsList = () => {

{org?.description}

+
+
    +
  • +
    +
    + Role(s): + {org.roles && + org.roles.length > 0 && + org.roles.map((role: string, index: number) => { + return ( + + {role.charAt(0).toUpperCase() + + role.slice(1)} + + ); + })} +
    +
    +
  • +
+