Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

merge: dev to qa #779

Merged
merged 56 commits into from
Oct 9, 2024
Merged
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
e3eb7b4
[Deno Deploy] Update .github/workflows/deploy.yml
deno-deploy[bot] Jun 7, 2024
95aeaa6
feat: support no ledger (#689)
bhavanakarwade Jun 7, 2024
a41d5aa
fixed CSS and avatar issues (#696)
pranalidhanavade Jun 9, 2024
eb793d8
feat: support no ledger (#697)
bhavanakarwade Jun 10, 2024
252b504
refactor: responsiveness of the component (#699)
bhavanakarwade Jun 14, 2024
c318707
feat: manage keycloak client
bhavanakarwade Jun 17, 2024
d40b608
refactor: updated env sample file
bhavanakarwade Jun 17, 2024
2d8875c
fix: error messages issue from create organization and create ecosyst…
pranalidhanavade Jun 17, 2024
03147ee
Merge pull request #702 from credebl/feat/manage-keycloak-client
shitrerohit Jun 18, 2024
40c3b7e
fix: css issues (#704)
bhavanakarwade Jun 19, 2024
7300fc6
feat: add passkey warning message for unsupported devices (#706)
pranalidhanavade Jun 19, 2024
5698893
Feat/passkey warning messages (#707)
pranalidhanavade Jun 19, 2024
0dc76d1
feat: dedicated agent workflow (#693)
pranalidhanavade Jun 20, 2024
7d5a77d
fix: formik validations for dedicated agent workflow (#708)
pranalidhanavade Jun 21, 2024
a297a2a
fix: create did button restrictions (#710)
bhavanakarwade Jun 21, 2024
7616a5f
feat: changed schema payload (#711)
tipusinghaw Jun 23, 2024
a97bdfd
feat/delete wallet and organization (#712)
pranalidhanavade Jun 25, 2024
d3fce1a
fix: custom-avatar-css-issues (#714)
pranalidhanavade Jun 26, 2024
42bd813
feat: delete wallet and organization (#715)
pranalidhanavade Jun 26, 2024
c888199
refactor: added query parameter in get all schemas API (#713)
bhavanakarwade Jun 26, 2024
1f4d3bc
refactor: request schema payload (#717)
bhavanakarwade Jul 8, 2024
d0c5625
fix:client id and secret encryption (#724)
pranalidhanavade Jul 25, 2024
759305e
Client id client secret encryption (#726)
pranalidhanavade Jul 25, 2024
744a19c
feat: create schema flow for w3c (#718)
pranalidhanavade Jul 30, 2024
f24a574
wip: verification with email (#722)
bhavanakarwade Jul 30, 2024
62b2d7e
feat: Implement w3c issuance with connection,email and bulk. (#721)
pranalidhanavade Jul 31, 2024
2603675
feat: W3C verifcation with connections. (#729)
pranalidhanavade Aug 13, 2024
874fcd0
fiz: removed unwanted code from astro components
pranalidhanavade Aug 16, 2024
d43a09a
feat: oob verification using email (#732)
bhavanakarwade Aug 22, 2024
d74f17f
fix: W3C issuance schemaName not displayed correctly on ADEYA. (#733)
pranalidhanavade Aug 23, 2024
801cade
refactor: predicates number vaidations (#734)
bhavanakarwade Aug 23, 2024
08ccf3e
Fix verification dashboard changes (#735)
pranalidhanavade Aug 23, 2024
579d269
fix: email input box issue (#736)
bhavanakarwade Aug 23, 2024
a22ec34
fix: create wallet UI for shared and dedicated agents. (#738)
pranalidhanavade Aug 26, 2024
48b580b
fix: routes changes for verifcation with email flow (#739)
bhavanakarwade Aug 26, 2024
b51c2e4
fix: OOB issuance with other organizations schema (#741)
pranalidhanavade Aug 28, 2024
a27d698
fix: radio button state issue on shared and dedicated wallet creation…
pranalidhanavade Aug 28, 2024
58a7fec
fix: bugs (#744)
bhavanakarwade Aug 28, 2024
644bb63
fix: bugs (#745)
bhavanakarwade Aug 28, 2024
4a3576c
fix: schema card click issue (#749)
bhavanakarwade Aug 29, 2024
0f6e71a
fix: schema name is not visible in credentials list (#750)
bhavanakarwade Aug 29, 2024
7c2865e
fix: Schemas Page Pagination Issue (#751)
pranalidhanavade Aug 29, 2024
2a9c6da
fix: replaced deploy.yml file (#755)
pranalidhanavade Aug 30, 2024
664e1fb
fix: Unable to store credentials during connection issuance when usin…
pranalidhanavade Sep 3, 2024
8c0f50f
fix: connection issuance payload changes for w3c (#759)
pranalidhanavade Sep 3, 2024
c5708d4
feat: support search functionality in issuance dropdown (#760)
bhavanakarwade Sep 5, 2024
9310af4
refactor: decouple ecosystem from existing code-base (#763)
pranalidhanavade Sep 30, 2024
82bc906
[Deno Deploy] Update .github/workflows/deploy.yml
deno-deploy[bot] Oct 1, 2024
ffe52e4
refactor: decouple ecosystem from existing code base (#764)
pranalidhanavade Oct 3, 2024
2805db0
[Deno Deploy] Update .github/workflows/deploy.yml
deno-deploy[bot] Oct 7, 2024
34fa11a
feat: changes in workflow file (#767)
pranalidhanavade Oct 7, 2024
e71a4dc
fix: changes in deploy yml file (#769)
pranalidhanavade Oct 7, 2024
abcbf25
[Deno Deploy] Update .github/workflows/deploy.yml
deno-deploy[bot] Oct 8, 2024
0290674
fix: userdashboard react minified error solved (#776)
pranalidhanavade Oct 9, 2024
9f274f7
fix: type errors in display user profile (#771)
pranalidhanavade Oct 9, 2024
8e28f69
Merge branch 'qa' of https://github.com/credebl/studio into merge/dev…
pranalidhanavade Oct 9, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
109 changes: 62 additions & 47 deletions src/components/User/UserDashBoard.tsx
Original file line number Diff line number Diff line change
@@ -1,24 +1,25 @@
import { useEffect, useState } from 'react';
import { AlertComponent } from '../AlertComponent';
import type { AxiosResponse } from 'axios';
import CustomAvatar from '../Avatar/index';
import type { Organisation } from '../organization/interfaces';
import type { UserActivity } from './interfaces';
import { Button, Tooltip } from 'flowbite-react';
import { getAllCredDef, getAllSchemasByOrgId } from '../../api/Schema';
import { getFromLocalStorage, setToLocalStorage } from '../../api/Auth';
import { apiStatusCodes, itemPerPage, storageKeys } from '../../config/CommonConstant';
import { getOrganizationById, getOrganizations } from '../../api/organization';
import { getUserActivity } from '../../api/users';
import {
getUserEcosystemInvitations,
getUserInvitations,
} from '../../api/invitations';
import { pathRoutes } from '../../config/pathRoutes';
import { getFromLocalStorage, setToLocalStorage } from '../../api/Auth';
import { dateConversion } from '../../utils/DateConversion';
import { useEffect, useState } from 'react';

import { AlertComponent } from '../AlertComponent';
import type { AxiosResponse } from 'axios';
import CustomAvatar from '../Avatar/index';
import DateTooltip from '../Tooltip';
import { Roles } from '../../utils/enums/roles';
import { Button, Tooltip } from 'flowbite-react';
import { getAllCredDef, getAllSchemasByOrgId } from '../../api/Schema';
import type { GetAllSchemaListParameter } from '../Resources/Schema/interfaces';
import type { Organisation } from '../organization/interfaces';
import { Roles } from '../../utils/enums/roles';
import type { UserActivity } from './interfaces';
import { dateConversion } from '../../utils/DateConversion';
import { getUserActivity } from '../../api/users';
import { pathRoutes } from '../../config/pathRoutes';
import React from 'react';
import {
OrganizationRoles,
Expand Down Expand Up @@ -50,10 +51,10 @@ interface ICredDef {
}

const UserDashBoard = () => {
const [message, setMessage] = useState<string | null>(null);
const [ecoMessage, setEcoMessage] = useState<string | null>(null);
const [message, setMessage] = useState<string | null>('');
const [ecoMessage, setEcoMessage] = useState<string | null>('');
const [viewButton, setViewButton] = useState<boolean>(false);
const [error, setError] = useState<string | null>(null);
const [error, setError] = useState<string | null>('');
const [currentPage, setCurrentPage] = useState(initialPageState);
const [organizationsList, setOrganizationList] =
useState<Array<Organisation> | null>(null);
Expand Down Expand Up @@ -85,6 +86,7 @@ const UserDashBoard = () => {

const getAllInvitations = async () => {
setLoading(true);
try {
const response = await getUserInvitations(
currentPage.pageNumber,
currentPage.pageSize,
Expand All @@ -106,9 +108,11 @@ const UserDashBoard = () => {
} else {
setError(response as string);
}
} catch(err) {
setError('An unexpected error occurred');
}
setLoading(false);
};
//Fetch the user organization list
const getAllOrganizations = async () => {
setOrgLoading(true);
const response = await getOrganizations(
Expand All @@ -128,9 +132,10 @@ const UserDashBoard = () => {
}
setOrgLoading(false);
};

const getAllEcosystemInvitations = async () => {
setLoading(true);
try {
const response = await getUserEcosystemInvitations(
currentPage.pageNumber,
currentPage.pageSize,
Expand All @@ -156,6 +161,10 @@ const UserDashBoard = () => {
} else {
setError(response as string);
}
}
catch(err){
setError('An unexpected error occurred.');
}
setLoading(false);
};

Expand Down Expand Up @@ -437,31 +446,39 @@ const UserDashBoard = () => {
};

return (
<>
<div className="px-4 pt-6">
<div className="cursor-pointer">
<AlertComponent
message={message || error}
type={message ? 'warning' : 'failure'}
{message && message.length > 0 &&

<AlertComponent
message={message}
type={message ? 'warning' : 'failure'}
viewButton={viewButton}
path={pathRoutes.users.invitations}
onAlertClose={() => {
setMessage(null);
setError(null);
setMessage('');
setError('');
}}
/>
/>
}


</div>
<div className="cursor-pointer">
<AlertComponent
message={ecoMessage}
type={'warning'}
viewButton={viewButton}
path={`${envConfig.PUBLIC_ECOSYSTEM_FRONT_END_URL}${pathRoutes.users.dashboard}` }

onAlertClose={() => {
setEcoMessage(null);
setError(null);
}}
/>
{ecoMessage && ecoMessage.length > 0 &&
<AlertComponent
message={ecoMessage}
type={ecoMessage ? 'warning' : 'failure'}
viewButton={viewButton}
path={`${envConfig.PUBLIC_ECOSYSTEM_FRONT_END_URL}${pathRoutes.users.dashboard}`}
onAlertClose={() => {
setEcoMessage('');
setError('');
}}
/>
}

</div>
{walletData && walletData.length > 0 ? (
<></>
Expand Down Expand Up @@ -572,7 +589,7 @@ const UserDashBoard = () => {
);
org.roles = roles;
return (
<span
<div
className="flex justify-between w-full mt-2 items-center"
key={org?.id}
>
Expand Down Expand Up @@ -603,12 +620,12 @@ const UserDashBoard = () => {
)}

<span className="flex items-center space-x-2 ml-3 text-lg font-bold text-gray-500 dark:text-white text-start truncate">
<span className="truncate"> {org?.name}</span>
<span className="truncate">{org?.name}</span>
<span>
{org.roles.includes(
OrganizationRoles.organizationOwner,
) ? (
<span title={org.roles}>
<span title={org.roles.join(", ")}>
<svg
width="24"
height="24"
Expand All @@ -629,10 +646,7 @@ const UserDashBoard = () => {
OrganizationRoles.organizationIssuer,
) ? (
<span
title={org.roles.slice(
0,
org.roles.length - 1,
)}
title={org.roles.slice(0, org.roles.length - 1).join(", ")}
>
<svg
width="24"
Expand Down Expand Up @@ -851,7 +865,7 @@ const UserDashBoard = () => {
</button>
</Tooltip>
</div>
</span>
</div>
);
})}
{organizationsList && organizationsList?.length > 0 && (
Expand Down Expand Up @@ -941,10 +955,10 @@ const UserDashBoard = () => {
className="flex items-center space-x-2 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white rounded-md"
>
<span className="ml-3 text-lg font-bold text-gray-500 dark:text-white text-primary-700 text-start">
{schema?.name}
{schema?.name || ''}
</span>
<span className="items-center font-normal text-md justify-start dark:text-white text-gray-600 truncate">
{schema?.version}
{schema?.version || ''}
</span>
</a>
</button>
Expand Down Expand Up @@ -1040,10 +1054,10 @@ const UserDashBoard = () => {
className="flex items-center space-x-2 py-2 hover:bg-gray-100 dark:hover:bg-gray-600 dark:hover:text-white rounded-md"
>
<span className="ml-3 text-lg font-bold text-gray-500 text-start dark:text-white text-primary-700 shrink-0">
{cred?.tag}
{cred?.tag || ''}
</span>
<span className="truncate text-md font-normal dark:text-white text-gray-600">
{cred?.credentialDefinitionId}
{cred?.credentialDefinitionId || ''}
</span>
</a>
</button>
Expand Down Expand Up @@ -1111,6 +1125,7 @@ const UserDashBoard = () => {


</div>
</>
);
};
export default UserDashBoard;
Loading