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 develop to main #445

Merged
merged 41 commits into from
Nov 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
102c2b3
feat: conversion id into uuid
bhavanakarwade Oct 26, 2023
3c1af34
feat: conversion of id's into uuid
bhavanakarwade Oct 27, 2023
b99422b
Merge branch 'develop' of https://github.com/credebl/studio into conv…
bhavanakarwade Oct 27, 2023
86551fa
Merge branch 'develop' of https://github.com/credebl/studio into conv…
bhavanakarwade Oct 31, 2023
0b3cde4
Merge branch 'develop' of https://github.com/credebl/studio into conv…
bhavanakarwade Nov 2, 2023
f393f78
resolved conficts
bhavanakarwade Nov 6, 2023
cd97faa
resolved conflicts
bhavanakarwade Nov 6, 2023
afc34c3
fix: minor fixes
16-karan Nov 21, 2023
25a3295
Merge branch 'develop' of https://github.com/credebl/studio into fix-…
16-karan Nov 22, 2023
9a118c9
Merge branch 'develop' of https://github.com/credebl/studio into conv…
MoulikaKulkarni Nov 22, 2023
0e58e5c
fix: minor changes
16-karan Nov 22, 2023
5ea7ff4
Merge branch 'develop' of https://github.com/credebl/studio into fix-…
16-karan Nov 22, 2023
909cce1
refactor:certificate meta tag title and description
pranalidhanavade Nov 22, 2023
a197296
refactor:certificate meta tag title and description
pranalidhanavade Nov 22, 2023
86bd1c0
Merge branch 'develop' of https://github.com/credebl/studio into cert…
pranalidhanavade Nov 22, 2023
273bd33
fix: socket and status for retry
16-karan Nov 22, 2023
de154ac
refactor: refresh button added
16-karan Nov 22, 2023
353f36e
Merge pull request #441 from credebl/certificate-template
sanjay-k1910 Nov 22, 2023
ef03e69
fix:id-to-uuid-conversion
MoulikaKulkarni Nov 22, 2023
5dde266
Merge branch 'develop' of https://github.com/credebl/studio into conv…
MoulikaKulkarni Nov 22, 2023
f908fb3
Merge pull request #438 from credebl/fix-bulk-issuance-changes
nishad-ayanworks Nov 22, 2023
542410f
refactor: bulk issuance
sanjay-k1910 Nov 22, 2023
6fb6809
change in message
16-karan Nov 22, 2023
845f3c5
Merge pull request #442 from credebl/refactor-messages-issuance
sanjay-k1910 Nov 22, 2023
6db78ba
Merge branch 'develop' of https://github.com/credebl/studio into conv…
sanjay-k1910 Nov 23, 2023
9727739
fix: minor changes in cred def id
16-karan Nov 23, 2023
c38b47e
refactor: bulk-issuance pages, date-time conversion
sanjay-k1910 Nov 23, 2023
4cf66dc
Merge branch 'develop' of https://github.com/credebl/studio into refa…
sanjay-k1910 Nov 23, 2023
b174138
Merge pull request #443 from credebl/fix-issuance-minor-changes
nishad-ayanworks Nov 23, 2023
b21a074
Merge branch 'develop' of https://github.com/credebl/studio into refa…
sanjay-k1910 Nov 23, 2023
164df37
refactor: back button in bulk issuance
sanjay-k1910 Nov 23, 2023
5826a2f
refactor: commented code removed
sanjay-k1910 Nov 23, 2023
282f173
Merge pull request #444 from credebl/refactor-bulk-issuance
nishad-ayanworks Nov 23, 2023
3875740
Merge branch 'develop' of https://github.com/credebl/studio into conv…
pranalidhanavade Nov 23, 2023
067855c
refactor: bulk issuance socket messages, upload file name
pranalidhanavade Nov 23, 2023
09388d6
Merge branch 'develop' of https://github.com/credebl/studio into conv…
sanjay-k1910 Nov 23, 2023
7567f9a
Merge branch 'conversion-id-into-uuid' of https://github.com/credebl/…
sanjay-k1910 Nov 23, 2023
af77768
refactor: status capsule of datatables
sanjay-k1910 Nov 23, 2023
c33e044
refactor: ui changes
sanjay-k1910 Nov 23, 2023
c2a9e14
Merge pull request #413 from credebl/conversion-id-into-uuid
nishad-ayanworks Nov 23, 2023
79c60ab
Merge branch 'develop' of https://github.com/credebl/studio into merg…
sanjay-k1910 Nov 23, 2023
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
2 changes: 1 addition & 1 deletion src/api/Agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { apiRoutes } from "../config/apiRoutes";
import { getFromLocalStorage } from "./Auth";
import { storageKeys } from "../config/CommonConstant";

export const getAgentHealth = async (orgId:number) => {
export const getAgentHealth = async (orgId:string) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const details = {
url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.checkAgentHealth}`,
Expand Down
20 changes: 4 additions & 16 deletions src/api/BulkIssuance.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import type download from 'downloadjs';
import { apiRoutes } from '../config/apiRoutes';
import { storageKeys } from '../config/CommonConstant';
import {
Expand All @@ -24,9 +23,8 @@ export const getSchemaCredDef = async () => {
}
};

export const DownloadCsvTemplate = async () => {
export const DownloadCsvTemplate = async (credDefId: string) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const credDefId = await getFromLocalStorage(storageKeys.CRED_DEF_ID);
const url = `${apiRoutes.organizations.root}/${orgId}/${credDefId}${apiRoutes.Issuance.download}`;

const axiosPayload = {
Expand All @@ -42,14 +40,8 @@ export const DownloadCsvTemplate = async () => {
}
};

// bulk issuance

// upload file

export const uploadCsvFile = async (payload: any) => {
export const uploadCsvFile = async (payload: {file: Uint8Array | Blob, fileName:string}, credefId: string) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const credefId = await getFromLocalStorage(storageKeys.CRED_DEF_ID);

const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Issuance.bulk.uploadCsv}?credDefId=${credefId}`;

const axiosPayload = {
Expand All @@ -66,8 +58,6 @@ export const uploadCsvFile = async (payload: any) => {
}
};

//get file data

export const getCsvFileData = async (
requestId: any,
pageNumber: number,
Expand Down Expand Up @@ -110,15 +100,13 @@ export const issueBulkCredential = async (requestId: string, clientId: string) =
}
};

export const retryBulkIssuance = async (fileId:string) => {
const socketId= await getFromLocalStorage(storageKeys.SOCKET_ID)

export const retryBulkIssuance = async (fileId:string, clientId:string) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${apiRoutes.organizations.root}/${orgId}/${fileId}${apiRoutes.Issuance.bulk.retry}`;

const axiosPayload = {
url,
payload:{clientId:socketId},
payload:{clientId:clientId},
config: await getHeaderConfigs(),
};

Expand Down
8 changes: 4 additions & 4 deletions src/api/Schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ export const getAllSchemasByOrgId = async ({ search, itemPerPage, page }: GetAll
}
}

export const addSchema = async (payload: createSchema, orgId: number) => {
export const addSchema = async (payload: createSchema, orgId: string) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const details = {
url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.create}`,
Expand All @@ -72,7 +72,7 @@ export const addSchema = async (payload: createSchema, orgId: number) => {
}
}

export const getSchemaById = async (schemaId: string, orgId: number) => {
export const getSchemaById = async (schemaId: string, orgId: string) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const details = {
url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.getSchemaById}/${schemaId}`,
Expand All @@ -94,7 +94,7 @@ export const getSchemaById = async (schemaId: string, orgId: number) => {
}
}

export const createCredentialDefinition = async (payload: createCredDeffFieldName, orgId:number) => {
export const createCredentialDefinition = async (payload: createCredDeffFieldName, orgId:string) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const details = {
url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.createCredentialDefinition}`,
Expand All @@ -118,7 +118,7 @@ export const createCredentialDefinition = async (payload: createCredDeffFieldNam
}
}

export const getCredDeffById = async (schemaId: string, orgId: number) => {
export const getCredDeffById = async (schemaId: string, orgId: string) => {
const token = await getFromLocalStorage(storageKeys.TOKEN)
const details = {
url: `${apiRoutes.organizations.root}/${orgId}${apiRoutes.schema.getCredDefBySchemaId}/${schemaId}/cred-defs`,
Expand Down
6 changes: 3 additions & 3 deletions src/api/ecosystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ interface CreateEcosystemPayload {
description: string;
logo: string;
tags?: string;
userId: number;
userId: string;
autoEndorsement: boolean;
}

Expand Down Expand Up @@ -105,7 +105,7 @@ export const getEndorsementList = async (
export const createSchemaRequest = async (
data: object,
endorsementId: string,
orgId: number,
orgId: string,
) => {
const url = `${apiRoutes.Ecosystem.root}/${endorsementId}/${orgId}${apiRoutes.Ecosystem.endorsements.createSchemaRequest}`;
const payload = data;
Expand All @@ -126,7 +126,7 @@ export const createSchemaRequest = async (
export const createCredDefRequest = async (
data: object,
ecosystemId: string,
orgId: number,
orgId: string,
) => {
const url = `${apiRoutes.Ecosystem.root}/${ecosystemId}/${orgId}${apiRoutes.Ecosystem.endorsements.createCredDefRequest}`;
const payload = data;
Expand Down
10 changes: 5 additions & 5 deletions src/api/invitations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ export const createInvitations = async (invitationList: Array<object>) => {
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.organizations.invitations}`
const payload = {
invitations: invitationList,
orgId: Number(orgId)
orgId: orgId
}
const token = await getFromLocalStorage(storageKeys.TOKEN)

Expand Down Expand Up @@ -233,7 +233,7 @@ export const getEcosystemInvitations = async (pageNumber: number, pageSize: numb
}

// Accept/ Reject Invitations
export const acceptRejectEcosystemInvitations = async (invitationId: string, orgId: number, status: string, orgName: string, orgDid: string) => {
export const acceptRejectEcosystemInvitations = async (invitationId: string, orgId: string, status: string, orgName: string, orgDid: string) => {

const url = `${apiRoutes.Ecosystem.root}/${orgId}${apiRoutes.Ecosystem.invitations}/${invitationId}`

Expand Down Expand Up @@ -265,12 +265,12 @@ export const acceptRejectEcosystemInvitations = async (invitationId: string, org
}
}

export const acceptRejectInvitations = async (invitationId: number, orgId: number, status: string) => {
export const acceptRejectInvitations = async (invitationId: string, orgId: string, status: string) => {

const url = `${apiRoutes.users.invitations}/${invitationId}`

const payload = {
orgId: Number(orgId),
orgId: orgId,
status
}
const token = await getFromLocalStorage(storageKeys.TOKEN)
Expand All @@ -296,7 +296,7 @@ export const acceptRejectInvitations = async (invitationId: number, orgId: numbe
}
}

export const deleteEcosystemInvitations = async (invitationId: number) => {
export const deleteEcosystemInvitations = async (invitationId: string) => {

const ecosystemId = await getFromLocalStorage(storageKeys.ECOSYSTEM_ID);
const orgId = await getFromLocalStorage(storageKeys.ORG_ID)
Expand Down
8 changes: 4 additions & 4 deletions src/api/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ export const getOrgDashboard = async (orgId: string) => {
}
}

export const spinupDedicatedAgent = async (data: object, orgId:number) => {
export const spinupDedicatedAgent = async (data: object, orgId:string) => {

const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.agentDedicatedSpinup}`
const payload = data
Expand Down Expand Up @@ -166,7 +166,7 @@ export const spinupDedicatedAgent = async (data: object, orgId:number) => {
}
}

export const spinupSharedAgent = async (data: object, orgId:number) => {
export const spinupSharedAgent = async (data: object, orgId:string) => {

const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Agent.agentSharedSpinup}`
const payload = data
Expand Down Expand Up @@ -247,7 +247,7 @@ export const getOrganizationUsers = async (pageNumber: number, pageSize: number,
}

// Edit user roles
export const editOrganizationUserRole = async (userId: number, roles: number[]) => {
export const editOrganizationUserRole = async (userId: string, roles: string[]) => {

const orgId = await getFromLocalStorage(storageKeys.ORG_ID)

Expand Down Expand Up @@ -284,7 +284,7 @@ export const createConnection = async (orgName: string) => {
label: orgName,
multiUseInvitation: true,
autoAcceptConnection: true,
orgId: Number(orgId)
orgId: orgId
}
const payload = data

Expand Down
22 changes: 22 additions & 0 deletions src/common/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,3 +57,25 @@ export enum EcosystemRoles {
export enum PlatformRoles {
platformAdmin = "platform_admin"
}

export enum BulkIssuanceHistory {
started = 'PROCESS_STARTED',
completed = 'PROCESS_COMPLETED',
interrupted= 'PROCESS_INTERRUPTED',
retry= 'PROCESS_REINITIATED',
partially_completed= 'PARTIALLY_COMPLETED'

}

export enum BulkIssuanceHistoryData {
started = 'Process Started',
completed = 'Process Completed',
interrupted= 'Process Interrupted',
retry= 'Process Reinitiated',
partially_completed= "Process Failed"
}

export enum BulkIssuanceStatus {
successful= 'Successful',
failed= 'Failed'
}
16 changes: 13 additions & 3 deletions src/common/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,13 @@ ul[role="tablist"] li[role="presentation"] button[aria-selected="true"] {
@apply text-primary-700 border-primary-700;
}

button.role-btn span {
@apply overflow-hidden;
border-radius: 8px;
padding-top: 6.5px;
padding-bottom: 6.5px;
}

.word-break-word{
word-break: break-word !important;
}
Expand Down Expand Up @@ -103,7 +110,7 @@ ul.timelinestatic {
}

.search-dropdown .select__control .select__placeholder {
@apply absolute flex items-start;
@apply absolute flex items-start ml-2;
}

.search-dropdown .select__control .select__value-container{
Expand All @@ -112,8 +119,11 @@ ul.timelinestatic {
}

.select__single-value{
@apply !text-primary-700;
width: calc(100% - 5px);
@apply dark:!text-white !text-primary-700 w-fit;
}

.select__value-container .select__value-container--has-value .select__single-value {
@apply w-fit;
}

.search-dropdown{
Expand Down
2 changes: 1 addition & 1 deletion src/commonComponents/AgentHealth.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const AgentHealth = () => {
const organizationId = await getFromLocalStorage(storageKeys.ORG_ID);
setCheckOrgExist(Number(organizationId))
if (Number(organizationId) !== 0) {
const agentData = await getAgentHealth(Number(organizationId));
const agentData = await getAgentHealth(organizationId);
const { data } = agentData as AxiosResponse;
if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
setAgentHealthDetails(data?.data);
Expand Down
6 changes: 3 additions & 3 deletions src/components/CreateEcosystemOrgModal/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {
storageKeys,
} from '../../config/CommonConstant';
import { calculateSize, dataURItoBlob } from '../../utils/CompressImage';
import { useEffect, useState } from 'react';
import React, { useEffect, useState } from 'react';
import { AlertComponent } from '../AlertComponent';
import type { AxiosResponse } from 'axios';
import { asset } from '../../lib/data.js';
Expand Down Expand Up @@ -186,7 +186,7 @@ const CreateEcosystemOrgModal = (props: IProps) => {
description: values.description,
logo: (logoImage?.imagePreviewUrl as string) || '',
tags: '',
userId: Number(user_data?.id),
userId: user_data?.id,
orgName: orgDetails?.orgName,
orgDid: orgDetails?.orgDid,
autoEndorsement: autoEndorse,
Expand Down Expand Up @@ -516,4 +516,4 @@ const CreateEcosystemOrgModal = (props: IProps) => {
return <>{renderEcosystemModal()}</>;
};

export default CreateEcosystemOrgModal;
export default CreateEcosystemOrgModal;
2 changes: 1 addition & 1 deletion src/components/Ecosystem/Endorsement/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ interface IEndorsementList {
status: string;
type: string;
ecosystemOrgs: {
orgId: number;
orgId: string;
};
requestPayload: string;
responsePayload: string;
Expand Down
6 changes: 3 additions & 3 deletions src/components/Ecosystem/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ export interface IEcosystem {
}

export interface Ecosystem {
id: number
id: string
createDateTime: string
createdBy: number
createdBy: string
lastChangedDateTime: string
lastChangedBy: string
autoEndorsement:boolean
lastChangedBy: number
name: string
description: string
logoUrl: string
Expand Down
10 changes: 5 additions & 5 deletions src/components/EcosystemInvite/EcoSystemReceivedInvitations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ export interface EcosystemInvitation {
ecosystem: { name: string; logoUrl: string; };
id: string
createDateTime: string
createdBy: number
createdBy: string
lastChangedDateTime: string
lastChangedBy: number
lastChangedBy: string
deletedAt: any
userId: string
orgId: string
Expand All @@ -60,7 +60,7 @@ const ReceivedInvitations = () => {
const [error, setError] = useState<string | null>(null);
const [organizationsList, setOrganizationsList] = useState<Array<Organisation> | null>(null);
const [currentPage, setCurrentPage] = useState(initialPageState);
const [selectedId, setSelectedId] = useState<number>();
const [selectedId, setSelectedId] = useState<string>('');
const [searchText, setSearchText] = useState('');
const [invitationsData, setInvitationsData] = useState<Array<EcosystemInvitation> | null>(null);
const [getOrgError, setGetOrgError] = useState<string | null>(null);
Expand Down Expand Up @@ -154,7 +154,7 @@ const ReceivedInvitations = () => {
if (orgDid) {
const response = await acceptRejectEcosystemInvitations(
invite.id,
Number(selectedId),
selectedId,
status,
orgName,
orgDid
Expand Down Expand Up @@ -222,7 +222,7 @@ const ReceivedInvitations = () => {
const getOrgId = async () => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
if (orgId) {
setSelectedId(Number(orgId));
setSelectedId(orgId);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/components/EcosystemInvite/SentInvitations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ const SentInvitations = () => {
setLoading(false);
};

const deletInvitations = async (invitationId: number) => {
const deletInvitations = async (invitationId: string) => {
const response = await deleteEcosystemInvitations(invitationId);
const { data } = response as AxiosResponse;

Expand Down
Loading