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: changes from develop branch to qa branch #678

Merged
merged 38 commits into from
May 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
d42a9cd
feat: multi select connections while issuance
bhavanakarwade Apr 4, 2024
51feb16
Merge branch 'develop' of https://github.com/credebl/studio into feat…
bhavanakarwade Apr 4, 2024
74f83b3
refactor: modify connection list screen
bhavanakarwade Apr 4, 2024
992a571
fix: resolved comments
bhavanakarwade Apr 4, 2024
5dd94bc
refactor: modify issuance ui
bhavanakarwade Apr 10, 2024
0f19378
Merge branch 'develop' of https://github.com/credebl/studio into feat…
bhavanakarwade Apr 10, 2024
8f24483
fix: modify query param name
bhavanakarwade Apr 12, 2024
cf08ebd
Merge branch 'develop' of https://github.com/credebl/studio into fix/…
bhavanakarwade Apr 12, 2024
7c6c3bc
fix: dark mode issues
bhavanakarwade Apr 12, 2024
9629a5d
Merge pull request #656 from credebl/fix/bug-fixes
sanjay-k1910 Apr 12, 2024
015053f
Refactor/update passkey package (#657)
tipusinghaw Apr 12, 2024
1ef1f6c
Merge branch 'develop' of https://github.com/credebl/studio into feat…
bhavanakarwade Apr 12, 2024
5110666
fix: redirection issue (#662)
sanjay-k1910 Apr 17, 2024
a48d5e6
refactor: allow domain with env (#663)
sanjay-k1910 Apr 17, 2024
89e514f
add: . for testing deno deploy
GHkrishna Apr 19, 2024
784b585
Merge branch 'develop' of https://github.com/credebl/studio into feat…
bhavanakarwade Apr 22, 2024
ba27e03
Merge branch 'develop' of https://github.com/credebl/studio into feat…
sanjay-k1910 Apr 22, 2024
199675e
fix: multipage connection selection
sanjay-k1910 Apr 23, 2024
751b53f
Merge branch 'feat/multiselcet-connections' of https://github.com/cre…
bhavanakarwade Apr 23, 2024
e8c6810
fix: checkoboxes state change functionality
bhavanakarwade Apr 23, 2024
41b6ef7
fix: issue button click
bhavanakarwade Apr 23, 2024
cb6f6ab
Merge pull request #652 from credebl/feat/multiselcet-connections
bhavanakarwade Apr 23, 2024
4484ca9
fix: checboxes selection issue
bhavanakarwade Apr 23, 2024
d177b52
Merge branch 'develop' of https://github.com/credebl/studio into feat…
bhavanakarwade Apr 23, 2024
ce650fa
[Deno Deploy] Update .github/workflows/deploy.yml
deno-deploy[bot] Apr 23, 2024
642c9db
Merge pull request #668 from credebl/feat/multiselcet-connections
sanjay-k1910 Apr 23, 2024
5c26347
feat: add own organizations in ecosystem (#667)
sanjay-k1910 Apr 26, 2024
06599e8
refactor: dockerfile changes
bhavanakarwade Apr 26, 2024
84751bd
Merge pull request #669 from credebl/refactor/dockerfile
Sheetal-ayanworks Apr 26, 2024
34afbe0
refactor: proof request payload for w3c format
pranalidhanavade Apr 29, 2024
ab6838c
Merge pull request #670 from credebl/verification-payload-changes-for…
pranalidhanavade Apr 30, 2024
7bd1081
fix: pagination parameter name to sync with backend
GHkrishna May 2, 2024
cd02469
Merge pull request #672 from credebl/fix/pagination-changes
pranalidhanavade May 2, 2024
ef12134
fix: image uri issue
GHkrishna May 15, 2024
26cf5d5
Merge pull request #675 from credebl/fix/image-uri-issue
GHkrishna May 16, 2024
6f962d6
fix: optional logo url addition while updating org details
GHkrishna May 16, 2024
1418fb4
Merge pull request #676 from credebl/fix/image-uri-issue
GHkrishna May 16, 2024
29f9632
feat: create new did and set primary did (#673)
bhavanakarwade May 16, 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
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
Loading