Skip to content

Commit

Permalink
Merge branch 'qa' of https://github.com/credebl/studio into merge/dev…
Browse files Browse the repository at this point in the history
…-to-qa-27-08-2024
  • Loading branch information
tipusinghaw committed Aug 27, 2024
2 parents 48b580b + ce49df8 commit 139d114
Show file tree
Hide file tree
Showing 15 changed files with 113 additions and 12 deletions.
2 changes: 1 addition & 1 deletion src/api/Auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -308,4 +308,4 @@ export const getFromCookies = (cookies: AstroCookies, key: string) =>{
export const removeFromLocalStorage = async (key: string) => {
await localStorage.removeItem(key);
return true;
};
};
1 change: 0 additions & 1 deletion src/components/AddOrganizationInEcosystem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,6 @@ const AddOrganizationInEcosystem = () => {
await removeFromLocalStorage(storageKeys.ERROR_ORG_IN_ECOSYSTEM);
})()
}, [])


useEffect(() => {
(async () => {
Expand Down
7 changes: 3 additions & 4 deletions src/components/Issuance/Issuance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,6 @@ const IssueCred = () => {
attributes: attributesArray,
};
});

const issuancePayload = {
credentialData,
credentialDefinitionId: credDefId,
Expand Down Expand Up @@ -364,12 +363,12 @@ const getSelectedUsers = async (): Promise<SelectedUsers[]> => {
const convertedAttributesValues = {
...issuancePayload,
};

setIssuanceLoader(true);
const issueCredRes = await issueCredential(convertedAttributesValues, credentialType);

const { data } = issueCredRes as AxiosResponse;

if (data?.statusCode === apiStatusCodes.API_STATUS_CREATED) {
setSuccess(data?.message);
window.location.href = `${pathRoutes.organizations.issuedCredentials}`;
Expand All @@ -380,7 +379,7 @@ const getSelectedUsers = async (): Promise<SelectedUsers[]> => {
setIssuanceLoader(false);
}
};

return (
<div className="px-4 pt-2">
<div className="mb-4 col-span-full xl:mb-2">
Expand Down
2 changes: 1 addition & 1 deletion src/components/organization/EditOrgdetailsModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import type { EditOrgdetailsModalProps, ILogoImage, Organisation, Values } from
import { processImage } from '../../utils/processImage';
import FormikErrorMessage from '../../commonComponents/formikerror/index'
import CustomSpinner from '../CustomSpinner';

interface IUpdateOrgPayload {
orgId: string | undefined;
name: string;
Expand Down
2 changes: 1 addition & 1 deletion src/components/organization/OrganizationDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -241,4 +241,4 @@ const OrganizationDetails = ({ orgData }: { orgData: Organisation | null }) => {
);
};

export default OrganizationDetails;
export default OrganizationDetails;
1 change: 0 additions & 1 deletion src/components/organization/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,6 @@ export interface ILedgerItem {
deletedAt: string | null;
}


export interface IOrgCount {
verificationRecordsCount: number;
connectionRecordsCount: number;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Button, Card, Pagination } from 'flowbite-react';
import { Button, Pagination } from 'flowbite-react';
import { useEffect, useState } from 'react';
import type { ChangeEvent } from 'react';

Expand Down Expand Up @@ -33,7 +33,6 @@ const ReceivedInvitations = () => {
const [error, setError] = useState<string | null>(null);

const [currentPage, setCurrentPage] = useState(initialPageState);
const timestamp = Date.now();

const onPageChange = (page: number) => {
setCurrentPage({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { apiStatusCodes, storageKeys } from '../../../config/CommonConstant';
import { getFromLocalStorage, passwordEncryption } from '../../../api/Auth';
import { getFromLocalStorage } from '../../../api/Auth';
import {
createDid,
getOrganizationById,
Expand Down Expand Up @@ -93,6 +93,7 @@ const WalletSpinup = (props: {
fetchOrganizationDetails()
}, []);


const onRadioSelect = (type: string) => {
setAgentType(type);
};
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
import LayoutSidebar from '../../../../../app/LayoutSidebar.astro';
import { pathRoutes } from '../../../../../config/pathRoutes';
import { checkUserSession } from '../../../../../utils/check-session';
const response = await checkUserSession({cookies: Astro.cookies, currentPath: Astro.url.pathname});
const route: string = pathRoutes.auth.sinIn
if (!response.authorized) {
return Astro.redirect(response.redirect);
}
---

<LayoutSidebar notFoundPage={!response.permitted}>
</LayoutSidebar>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
import LayoutSidebar from "../../../../../../../app/LayoutSidebar.astro";
import EmailAttributesSelection from "../../../../../../../components/Verification/EmailAttributesSelection";
import { checkUserSession } from "../../../../../../../utils/check-session";
const response = await checkUserSession({cookies: Astro.cookies, currentPath: Astro.url.pathname});
if (!response.authorized) {
return Astro.redirect(response.redirect);
}
---

<LayoutSidebar notFoundPage={!response.permitted}>
<EmailAttributesSelection client:load />
</LayoutSidebar>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
import LayoutSidebar from "../../../../../../../../app/LayoutSidebar.astro";
import EmailVerification from "../../../../../../../../components/Verification/EmailVerification";
import { checkUserSession } from "../../../../../../../../utils/check-session";
const response = await checkUserSession({cookies: Astro.cookies, currentPath: Astro.url.pathname});
if (!response.authorized) {
return Astro.redirect(response.redirect);
}
---

<LayoutSidebar notFoundPage={!response.permitted}>
<EmailVerification client:load />
</LayoutSidebar>
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
---
import LayoutSidebar from "../../../../../../../../app/LayoutSidebar.astro";
import EmailAttributesSelection from "../../../../../../../../components/Verification/EmailAttributesSelection";
import { checkUserSession } from "../../../../../../../../utils/check-session";
const response = await checkUserSession({cookies: Astro.cookies, currentPath: Astro.url.pathname});
if (!response.authorized) {
return Astro.redirect(response.redirect);
}
---

<LayoutSidebar notFoundPage={!response.permitted}>
<EmailAttributesSelection client:load />
</LayoutSidebar>
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
---
import LayoutSidebar from "../../../../../../../../../app/LayoutSidebar.astro";
import EmailVerification from "../../../../../../../../../components/Verification/EmailVerification";
import { checkUserSession } from "../../../../../../../../../utils/check-session";
const response = await checkUserSession({cookies: Astro.cookies, currentPath: Astro.url.pathname});
if (!response.authorized) {
return Astro.redirect(response.redirect);
}
---

<LayoutSidebar notFoundPage={!response.permitted}>
<EmailVerification client:load />
</LayoutSidebar>
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
import LayoutSidebar from "../../../../../../../app/LayoutSidebar.astro";
import EmailCredDefSelection from "../../../../../../../components/Verification/EmailCredDefSelection";
import { pathRoutes } from "../../../../../../../config/pathRoutes";
import { checkUserSession } from "../../../../../../../utils/check-session";
const response = await checkUserSession({cookies: Astro.cookies, currentPath: Astro.url.pathname});
const route: string = pathRoutes.auth.sinIn
if (!response.authorized) {
return Astro.redirect(response.redirect);
}
---

<LayoutSidebar notFoundPage={!response.permitted}>
<EmailCredDefSelection client:load/>
</LayoutSidebar>
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
import LayoutSidebar from "../../../../../../app/LayoutSidebar.astro";
import EmailSchemaSelection from "../../../../../../components/Verification/EmailSchemaSelection";
import { pathRoutes } from "../../../../../../config/pathRoutes";
import { checkUserSession } from "../../../../../../utils/check-session";
const response = await checkUserSession({cookies: Astro.cookies, currentPath: Astro.url.pathname});
const route: string = pathRoutes.auth.sinIn
if (!response.authorized) {
return Astro.redirect(response.redirect);
}
---

<LayoutSidebar notFoundPage={!response.permitted}>
<EmailSchemaSelection client:load/>
</LayoutSidebar>

0 comments on commit 139d114

Please sign in to comment.