Skip to content

Commit

Permalink
merge: changes from DEV to QA environment (#682)
Browse files Browse the repository at this point in the history
* feat: multi select connections while issuance

Signed-off-by: bhavanakarwade <[email protected]>

* refactor: modify connection list screen

Signed-off-by: bhavanakarwade <[email protected]>

* fix: resolved comments

Signed-off-by: bhavanakarwade <[email protected]>

* refactor: modify issuance ui

Signed-off-by: bhavanakarwade <[email protected]>

* fix: modify query param name

Signed-off-by: bhavanakarwade <[email protected]>

* fix: dark mode issues

Signed-off-by: bhavanakarwade <[email protected]>

* Refactor/update passkey package (#657)

* refactor: update passkey version

Signed-off-by: tipusinghaw <[email protected]>

* fix: added version in package.json

Signed-off-by: tipusinghaw <[email protected]>

---------

Signed-off-by: tipusinghaw <[email protected]>

* fix: redirection issue (#662)

Signed-off-by: sanjay.khatal <[email protected]>

* refactor: allow domain with env (#663)

Signed-off-by: sanjay.khatal <[email protected]>

* add: . for testing deno deploy

Signed-off-by: Krishna <[email protected]>

* fix: multipage connection selection

Signed-off-by: sanjay.khatal <[email protected]>

* fix: checkoboxes state change functionality

Signed-off-by: bhavanakarwade <[email protected]>

* fix: issue button click

Signed-off-by: bhavanakarwade <[email protected]>

* fix: checboxes selection issue

Signed-off-by: bhavanakarwade <[email protected]>

* [Deno Deploy] Update .github/workflows/deploy.yml

* feat: add own organizations in ecosystem (#667)

* feat: created page

Signed-off-by: sanjay.khatal <[email protected]>

* feat: add own organizations in the ecosystem

Signed-off-by: sanjay.khatal <[email protected]>

* feat: add orgs in ecosystem

Signed-off-by: sanjay.khatal <[email protected]>

* fix: types, redirection and error handling

Signed-off-by: sanjay.khatal <[email protected]>

* fix: sonarlint issues

Signed-off-by: sanjay.khatal <[email protected]>

* fix: role wise list access

Signed-off-by: bhavanakarwade <[email protected]>

* fix: resolved comments

Signed-off-by: bhavanakarwade <[email protected]>

* fix: pagesize

Signed-off-by: bhavanakarwade <[email protected]>

---------

Signed-off-by: sanjay.khatal <[email protected]>
Signed-off-by: bhavanakarwade <[email protected]>
Co-authored-by: bhavanakarwade <[email protected]>

* refactor: dockerfile changes

Signed-off-by: bhavanakarwade <[email protected]>

* refactor: proof request payload for w3c format

Signed-off-by: pranalidhanavade <[email protected]>

* fix: pagination parameter name to sync with backend

Signed-off-by: Krishna <[email protected]>

* fix: image uri issue

Signed-off-by: Krishna <[email protected]>

* fix: optional logo url addition while updating org details

Signed-off-by: Krishna <[email protected]>

* feat: create new did and set primary did (#673)

* feat: create and update did

Signed-off-by: sanjay.khatal <[email protected]>

* feat: implement create new did and set primary did ui

Signed-off-by: bhavanakarwade <[email protected]>

* reafctor: interface name

Signed-off-by: bhavanakarwade <[email protected]>

* refactor: payload type

Signed-off-by: bhavanakarwade <[email protected]>

* fix: resolved comments on PR

Signed-off-by: bhavanakarwade <[email protected]>

---------

Signed-off-by: sanjay.khatal <[email protected]>
Signed-off-by: bhavanakarwade <[email protected]>
Co-authored-by: sanjay.khatal <[email protected]>

* refactor: api endpoint (#677)

* refactor: parameter name

Signed-off-by: bhavanakarwade <[email protected]>

* refactor: added query parameter

Signed-off-by: bhavanakarwade <[email protected]>

* fix: remove unnecessary code

Signed-off-by: bhavanakarwade <[email protected]>

* fix: query param issue

Signed-off-by: bhavanakarwade <[email protected]>

---------

Signed-off-by: bhavanakarwade <[email protected]>

* fix: checkboxes state clear issue (#680)

* feat: created page

Signed-off-by: sanjay.khatal <[email protected]>

* feat: add own organizations in the ecosystem

Signed-off-by: sanjay.khatal <[email protected]>

* feat: add orgs in ecosystem

Signed-off-by: sanjay.khatal <[email protected]>

* fix: types, redirection and error handling

Signed-off-by: sanjay.khatal <[email protected]>

* fix: sonarlint issues

Signed-off-by: sanjay.khatal <[email protected]>

* fix: role wise list access

Signed-off-by: bhavanakarwade <[email protected]>

* fix: resolved comments

Signed-off-by: bhavanakarwade <[email protected]>

* fix: pagesize

Signed-off-by: bhavanakarwade <[email protected]>

* fix: checkboxes state clear issue

Signed-off-by: bhavanakarwade <[email protected]>

* fix: remove unnecessary attribute

Signed-off-by: bhavanakarwade <[email protected]>

---------

Signed-off-by: sanjay.khatal <[email protected]>
Signed-off-by: bhavanakarwade <[email protected]>
Co-authored-by: sanjay.khatal <[email protected]>

---------

Signed-off-by: bhavanakarwade <[email protected]>
Signed-off-by: tipusinghaw <[email protected]>
Signed-off-by: sanjay.khatal <[email protected]>
Signed-off-by: Krishna <[email protected]>
Signed-off-by: pranalidhanavade <[email protected]>
Co-authored-by: Sanjay Khatal <[email protected]>
Co-authored-by: tipusinghaw <[email protected]>
Co-authored-by: Krishna <[email protected]>
Co-authored-by: sanjay.khatal <[email protected]>
Co-authored-by: deno-deploy[bot] <75045203+deno-deploy[bot]@users.noreply.github.com>
Co-authored-by: Sheetal-ayanworks <[email protected]>
Co-authored-by: pranalidhanavade <[email protected]>
Co-authored-by: pranalidhanavade <[email protected]>
Co-authored-by: Krishna <[email protected]>
  • Loading branch information
10 people authored May 28, 2024
1 parent c2fbaf3 commit 5f79d3b
Show file tree
Hide file tree
Showing 6 changed files with 309 additions and 217 deletions.
3 changes: 2 additions & 1 deletion src/api/ecosystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,10 +110,11 @@ export const getEndorsementList = async (

export const createSchemaRequest = async (
data: object,
schemaType: string,
endorsementId: string,
orgId: string,
) => {
const url = `${apiRoutes.Ecosystem.root}/${endorsementId}/${orgId}${apiRoutes.Ecosystem.endorsements.createSchemaRequest}`;
const url = `${apiRoutes.Ecosystem.root}/${endorsementId}/${orgId}${apiRoutes.Ecosystem.endorsements.createSchemaRequest}?schemaType=${schemaType}`;
const payload = data;
const axiosPayload = {
url,
Expand Down
4 changes: 4 additions & 0 deletions src/common/enums.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ export enum ProofRequestStateUserText {
abandoned = 'Declined',
}

export enum SchemaType {
INDY = 'indy',
W3C = 'w3c'
}
export enum IssueCredentialUserText {
offerSent = 'Offered',
done = 'Accepted',
Expand Down
106 changes: 84 additions & 22 deletions src/components/AddOrganizationInEcosystem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,7 @@ const AddOrganizationInEcosystem = () => {
};

const refreshPage = () => {
setLocalOrgs([]);
getOwnerOrganizations(listAPIParameter);
};

Expand All @@ -241,43 +242,104 @@ const AddOrganizationInEcosystem = () => {
}

const handleAddOrganization = async () => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID) || "";
const ecosystemId = await getFromLocalStorage(storageKeys.ECOSYSTEM_ID) || "";
setLoader(true)
const orgId = (await getFromLocalStorage(storageKeys.ORG_ID)) || '';
const ecosystemId =
(await getFromLocalStorage(storageKeys.ECOSYSTEM_ID)) || '';
setLoader(true);
try {
const response = await addOrganizationInEcosystem(localOrgs, ecosystemId, orgId);
const response = await addOrganizationInEcosystem(
localOrgs,
ecosystemId,
orgId,
);
const { data } = response as AxiosResponse;
setLoader(false)
setLoader(false);
setLocalOrgs([]);
setErrorList([]);
setOrganizationsList(
(prevState) =>
prevState?.map((org) => ({ ...org, checked: false, error: '' })) ||
[],
);

switch (data?.statusCode) {
case apiStatusCodes.API_STATUS_CREATED:
await removeFromLocalStorage(storageKeys.SELECT_ORG_IN_ECOSYSTEM)
setSuccess(data.message)
await removeFromLocalStorage(storageKeys.SELECT_ORG_IN_ECOSYSTEM);
setSuccess(data.message);
setTimeout(() => {
window.location.href = pathRoutes.ecosystem.dashboard;
}, 1000);
break;

case apiStatusCodes.API_STATUS_PARTIALLY_COMPLETED:
await removeFromLocalStorage(storageKeys.SELECT_ORG_IN_ECOSYSTEM)
const errors = data?.data?.filter((item: IErrorResponse) => item.statusCode !== apiStatusCodes.API_STATUS_CREATED)
const errorData = errors.map((item: IErrorResponse) => ({ id: item?.data?.orgId || "", error: item.message }))
await setToLocalStorage(storageKeys.ERROR_ORG_IN_ECOSYSTEM, JSON.stringify(errorData))
setErrorList(errorData)
const updateWithError = organizationsList && organizationsList?.length > 0 ? organizationsList?.map((item => ({
...item,
error: errors?.find((ele: IErrorResponse) => ele?.data?.orgId === item.id)?.message || ""
}))) : []
await removeFromLocalStorage(storageKeys.SELECT_ORG_IN_ECOSYSTEM);
const errors = data?.data?.filter(
(item: IErrorResponse) =>
item.statusCode !== apiStatusCodes.API_STATUS_CREATED,
);
const errorData = errors.map((item: IErrorResponse) => ({
id: item?.data?.orgId || '',
error: item.message,
}));
await setToLocalStorage(
storageKeys.ERROR_ORG_IN_ECOSYSTEM,
JSON.stringify(errorData),
);
setErrorList(errorData);
setLocalOrgs([]);

const updateWithError =
organizationsList && organizationsList?.length > 0
? organizationsList?.map((item) => ({
...item,
error:
errors?.find(
(ele: IErrorResponse) => ele?.data?.orgId === item.id,
)?.message || '',
checked: false
}))
: [];
setSuccess(data?.message);
setOrganizationsList(updateWithError)
setOrganizationsList(updateWithError);
setErrorList([]);
break;
default:
setError(response as string || data?.message)
setError((response as string) || data?.message);
setErrorList([]);
setLocalOrgs([]);
setOrganizationsList(
(prevState) =>
prevState?.map((org) => ({
...org,
checked: false,
error: '',
})) || [],
);

break;
}
} catch (error) {
setError(error.message as string)
setLoader(false)
setError(error.message as string);
setLoader(false);
setLocalOrgs([]);
setErrorList([]);
setOrganizationsList(
(prevState) =>
prevState?.map((org) => ({ ...org, checked: false, error: '' })) ||
[],
);
}
}
};

useEffect(() => {
const clearLocalStorage = async () => {
await removeFromLocalStorage(storageKeys.SELECT_ORG_IN_ECOSYSTEM);
await removeFromLocalStorage(storageKeys.ERROR_ORG_IN_ECOSYSTEM);
};
clearLocalStorage();
refreshPage();

}, []);

useEffect(() => {
getOwnerOrganizations(listAPIParameter);
Expand All @@ -291,7 +353,7 @@ const AddOrganizationInEcosystem = () => {
await removeFromLocalStorage(storageKeys.ERROR_ORG_IN_ECOSYSTEM);
})()
}, [])

useEffect(() => {
(async () => {
await setToLocalStorage(storageKeys.SELECT_ORG_IN_ECOSYSTEM, JSON.stringify(localOrgs))
Expand Down
Loading

0 comments on commit 5f79d3b

Please sign in to comment.