Skip to content

Commit

Permalink
refactor: decouple ecosystem from existing code base (#764)
Browse files Browse the repository at this point in the history
* feat: decouple ecosystem codebase

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

* feat: org dashboard changes

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

* fix: added conditions for empty list components and create endorsement buttons

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

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

* feat:added env varibales in envConfig

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

* feat: added ecosystem intercepter for ecosystem

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

* refactor: changes in axios methods

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

* fix: redirection logic for create schema page

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

* fix: delete organization issues

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

* refactor: removed unused and commented code

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

---------

Signed-off-by: pranalidhanavade <[email protected]>
Signed-off-by: Tipu_Singh <[email protected]>
Co-authored-by: deno-deploy[bot] <75045203+deno-deploy[bot]@users.noreply.github.com>
Co-authored-by: Tipu_Singh <[email protected]>
  • Loading branch information
3 people authored Oct 3, 2024
1 parent 82bc906 commit ffe52e4
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 50 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Deploy
on:
push:
branches: develop
branches: main
pull_request:
branches: develop
branches: main

jobs:
deploy:
Expand Down
22 changes: 0 additions & 22 deletions src/components/Ecosystem/EcosystemSidebarOption.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,16 @@ const initialPageState = {

const EcosystemSidebarOption = () => {
const [isEcosystemEnabled, setIsEcosystemEnabled] = useState(false);
//TODO: Logic to disable ecosystem when organzaition and wallet is not created

// const [currentPage, setCurrentPage] = useState(initialPageState);
// const [orgCount, setOrgCount] = useState(0);
// const [error, setError] = useState<string | null>(null);

// const getAllOrganizations = async () => {
// const response = await getOrganizations(
// currentPage.pageNumber,
// currentPage.pageSize,
// '',
// );
// const { data } = response as AxiosResponse;
// if (data?.statusCode === apiStatusCodes.API_STATUS_SUCCESS) {
// setOrgCount(data?.data?.totalCount);
// } else {
// setError(response as string);
// }
// };

useEffect(() => {
const checkEcosystemData = async () => {
setIsEcosystemEnabled(true);
};
checkEcosystemData();
//TODO: Logic to disable ecosystem when organzaition and wallet is not created
// getAllOrganizations();
}, []);


if (isEcosystemEnabled
// && orgCount
) {
return (
<li>
Expand Down
7 changes: 1 addition & 6 deletions src/components/organization/Dashboard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,9 @@ const Dashboard = () => {
const roles = orgRoles.split(',');
setUserRoles(roles);
};
// const getEcosystemRole = async () => {
// const ecosysmetmRoles = await getFromLocalStorage(storageKeys.ECOSYSTEM_ROLE);
// console.log("ecosysmetmRoles",ecosysmetmRoles);
// setEcosystemUserRoles(ecosysmetmRoles)
// };

useEffect(() => {
getUserRoles();
// getEcosystemRole();
}, []);


Expand Down
21 changes: 1 addition & 20 deletions src/components/organization/DeleteOrganization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,25 +8,6 @@ import {
getOrganizationReferences
} from "../../api/organization";

export interface IEcosystemOrganizations {
id: string;
orgId: string;
status: string;
createDateTime: string;
lastChangedDateTime: string;
ecosystemId: string;
ecosystemRoleId: string;
ecosystemRole: IEcosystemRole;
}
export interface IEcosystemRole {
id: string;
name: string;
description: string;
createDateTime: string;
lastChangedDateTime: string;
deletedAt: string | null;
}

import BreadCrumbs from "../BreadCrumbs";
import { deleteOrganizationWallet } from "../../api/Agent";
import ConfirmationModal from "../../commonComponents/ConfirmationModal";
Expand All @@ -40,7 +21,7 @@ import React from "react";
import { deleteVerificationRecords } from '../../api/verification';
import { deleteIssuanceRecords } from '../../api/issuance';
import { deleteConnectionRecords} from '../../api/connection'
import type { IOrgCount } from "./interfaces";
import type { IEcosystemOrganizations, IOrgCount } from "./interfaces";
import { EcosystemRoles } from "../../common/enums";

const DeleteOrganizations = () => {
Expand Down
19 changes: 19 additions & 0 deletions src/components/organization/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -248,3 +248,22 @@ export interface ILedgerItem {
orgInvitationsCount: number;
orgUsersCount: number;
}

export interface IEcosystemOrganizations {
id: string;
orgId: string;
status: string;
createDateTime: string;
lastChangedDateTime: string;
ecosystemId: string;
ecosystemRoleId: string;
ecosystemRole: IEcosystemRole;
}
export interface IEcosystemRole {
id: string;
name: string;
description: string;
createDateTime: string;
lastChangedDateTime: string;
deletedAt: string | null;
}

0 comments on commit ffe52e4

Please sign in to comment.