Skip to content

Commit

Permalink
merge: changes from develop branch to qa branch (#678)
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]>

---------

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 17, 2024
1 parent d5163f5 commit c2fbaf3
Show file tree
Hide file tree
Showing 37 changed files with 1,963 additions and 540 deletions.
21 changes: 8 additions & 13 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Deploy main to Deno Deploy
name: Deploy
on:
push:
branches: main
branches: develop
pull_request:
branches: main
branches: develop

jobs:
deploy:
Expand All @@ -16,24 +16,19 @@ jobs:

steps:
- name: Clone repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Deno
uses: denoland/setup-deno@v1
with:
deno-version: v1.x

- name: Install Node.js
uses: actions/setup-node@v3
with:
node-version: lts/*

- name: Build step
run: "npm install && npm run build" # 📝 Update the build command(s) if necessary
run: "npm install && npm run build"

- name: Upload to Deno Deploy
uses: denoland/deployctl@v1
with:
project: "credebl-studio"
entrypoint: "server/entry.mjs" # 📝 Update the entrypoint if necessary
root: "dist" # 📝 Update the root if necessary
project: "credebl-dev-ui"
entrypoint: "server/entry.mjs"
root: "dist"
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,4 @@ COPY --from=build /app/node_modules ./node_modules
COPY --from=build /app/package.json ./
COPY --from=build /app/dist ./dist
EXPOSE 3000
CMD [ "npm", "run", "preview" ]
CMD ["deno", "run", "--allow-net", "--allow-read", "--allow-env", "./dist/server/entry.mjs"]
34 changes: 17 additions & 17 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@babel/runtime": "^7.22.6",
"@babel/runtime-corejs3": "^7.22.6",
"@faker-js/faker": "^7.6.0",
"@simplewebauthn/browser": "^7.2.0",
"@simplewebauthn/browser": "9.0.1",
"@supabase/supabase-js": "^2.31.0",
"@tanstack/react-form": "^0.0.11",
"@types/react": "^18.2.14",
Expand Down
24 changes: 24 additions & 0 deletions src/api/ecosystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -257,3 +257,27 @@ export const getEcosystemMemberList = async ({
return err?.message;
}
};


export const addOrganizationInEcosystem = async (
data: string[],
ecosystemId: string,
orgId: string,
) => {
const url = `${apiRoutes.Ecosystem.root}/${ecosystemId}/${orgId}${apiRoutes.organizations.root}`;
const payload = {
organizationIds: data
};
const axiosPayload = {
url,
payload,
config: await getHeaderConfigs(),
};

try {
return await axiosPost(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};
2 changes: 1 addition & 1 deletion src/api/issuance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ export const getIssuedCredentials = async ({page,
sortingOrder,
filter}: IConnectionListAPIParameter) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Issuance.getIssuedCredentials}?pageSize=${itemPerPage}&pageNumber=${page}&searchByText=${search}&sortBy=${sortingOrder}&sortField=${sortBy}`;
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Issuance.getIssuedCredentials}?pageSize=${itemPerPage}&pageNumber=${page}&search=${search}&sortBy=${sortingOrder}&sortField=${sortBy}`;
const axiosPayload = {
url,
config: await getHeaderConfigs(),
Expand Down
64 changes: 63 additions & 1 deletion src/api/organization.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { apiRoutes } from '../config/apiRoutes';
import { getFromLocalStorage } from './Auth';
import { getHeaderConfigs } from '../config/GetHeaderConfigs';
import { storageKeys } from '../config/CommonConstant';
import type { IUpdatePrimaryDid } from '../components/organization/interfaces';

export const createOrganization = async (data: object) => {
const url = apiRoutes.organizations.create;
Expand Down Expand Up @@ -65,8 +66,10 @@ export const getOrganizations = async (
pageNumber: number,
pageSize: number,
search = '',
role = ''
) => {
const url = `${apiRoutes.organizations.getAll}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}`;
const roleQuery = role ? `&role=${role}` : ''
const url = `${apiRoutes.organizations.getAll}?pageNumber=${pageNumber}&pageSize=${pageSize}&search=${search}${roleQuery}`;

const token = await getFromLocalStorage(storageKeys.TOKEN);

Expand Down Expand Up @@ -362,3 +365,62 @@ export const deleteOrganizationInvitation = async (
return err?.message;
}
};

export const getDids = async (orgId: string) => {
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.organizations.didList}`;

const token = await getFromLocalStorage(storageKeys.TOKEN);

const config = {
headers: {
'Content-Type': 'application/json',
Authorization: `Bearer ${token}`,
},
};
const axiosPayload = {
url,
config,
};

try {
return await axiosGet(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};

export const createDid = async (payload: any) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.organizations.createDid}`;

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

try {
return await axiosPost(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};

export const updatePrimaryDid = async (orgId: string, payload: IUpdatePrimaryDid) => {
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.organizations.primaryDid}`;

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

try {
return await axiosPut(axiosPayload);
} catch (error) {
const err = error as Error;
return err?.message;
}
};
2 changes: 1 addition & 1 deletion src/api/verification.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export const getVerificationList = async ({
sortingOrder,
}: IConnectionListAPIParameter) => {
const orgId = await getFromLocalStorage(storageKeys.ORG_ID);
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Verification.verifyCredential}?pageSize=${itemPerPage}&pageNumber=${page}&searchByText=${search}&sortBy=${sortingOrder}&sortField=${sortBy}`;
const url = `${apiRoutes.organizations.root}/${orgId}${apiRoutes.Verification.verifyCredential}?pageSize=${itemPerPage}&pageNumber=${page}&search=${search}&sortBy=${sortingOrder}&sortField=${sortBy}`;

const axiosPayload = {
url,
Expand Down
1 change: 1 addition & 0 deletions src/app/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,3 +55,4 @@ export const RANDOMIZE = Boolean(env.RANDOMIZE) || true;
// ],
// },
// ];

19 changes: 9 additions & 10 deletions src/commonComponents/datatable/SortDataTable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import type { IDataTable } from './interface';
import CustomSpinner from '../../components/CustomSpinner';
import SearchInput from '../../components/SearchInput';
import { Pagination } from 'flowbite-react';
import { ChangeEvent, useState } from 'react';
import { useState } from 'react';
import { EmptyListMessage } from '../../components/EmptyListComponent';

const SortDataTable: React.FC<IDataTable> = ({
Expand All @@ -28,13 +28,14 @@ const SortDataTable: React.FC<IDataTable> = ({
discription,
noExtraHeight,
sortOrder,
itemPerPage
}) => {
const [selectedValue, setSelectedValue] = useState(sortOrder ?? '');

const handleSortByValues = (event: { target: { value: any } }) => {
const newSelectedValue = event.target.value;
setSelectedValue(newSelectedValue);
if(searchSortByValue){
if (searchSortByValue) {
searchSortByValue(newSelectedValue);
}
};
Expand All @@ -48,9 +49,8 @@ const SortDataTable: React.FC<IDataTable> = ({
nextPage?: number;
lastPage?: number;
};

const startItem = (nextPage - 2) * 10 + 1;
const endItem = Math.min((nextPage - 1) * 10, totalItem);
const startItem = (nextPage - 2) * (itemPerPage || 10) + 1;
const endItem = Math.min((nextPage - 1) * (itemPerPage || 10), totalItem);

const sortValues = [
{
Expand Down Expand Up @@ -177,13 +177,12 @@ const SortDataTable: React.FC<IDataTable> = ({
</tr>
) : (
<tbody className="bg-white dark:bg-gray-800 w-full">
{data.length ? (
data.map((ele, index) => (
{data?.length ? (
data?.map((ele, index) => (
<tr
key={index}
className={`${
index % 2 !== 0 ? 'bg-gray-50 dark:bg-gray-700' : ''
}`}
className={`${index % 2 !== 0 ? 'bg-gray-50 dark:bg-gray-700' : ''
}`}
>
{ele.data.map((subEle, index) => (
<td
Expand Down
3 changes: 2 additions & 1 deletion src/commonComponents/datatable/interface.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export interface IDataTable {
currentPage: any;
onPageChange: (page: number) => void;
totalPages: number;
searchSortByValue: (value: any) => void;
searchSortByValue?: (value: string) => void;
isPagination?: boolean;
isSearch: boolean;
isRefresh: boolean;
Expand All @@ -47,4 +47,5 @@ export interface IDataTable {
}
| {};
sortOrder?:string;
itemPerPage?: number;
}
Loading

0 comments on commit c2fbaf3

Please sign in to comment.