-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* wip: email verification Signed-off-by: bhavanakarwade <[email protected]> * wip: verification using email Signed-off-by: bhavanakarwade <[email protected]> * wip: verification with email Signed-off-by: bhavanakarwade <[email protected]> * wip: routes changes for verification dashboard Signed-off-by: bhavanakarwade <[email protected]> * wip: routes changes Signed-off-by: bhavanakarwade <[email protected]> * wip: Implemented custom dashboard component for veriifcation and issuance dashboard Signed-off-by: bhavanakarwade <[email protected]> --------- Signed-off-by: bhavanakarwade <[email protected]>
- Loading branch information
1 parent
744a19c
commit f24a574
Showing
15 changed files
with
227 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
import React from 'react'; | ||
import { Card } from 'flowbite-react'; | ||
import BackButton from '../commonComponents/backbutton'; | ||
import BreadCrumbs from '../components/BreadCrumbs' | ||
|
||
const Dashboard = ({ title, options, backButtonPath }) => { | ||
return ( | ||
<div className="px-4 pt-2 h-full h-[700px]"> | ||
<div className="mt-1"> | ||
<BreadCrumbs /> | ||
</div> | ||
<div className="mb-2 flex justify-between items-center relative"> | ||
<h1 className="text-xl font-semibold text-gray-900 sm:text-2xl dark:text-white"> | ||
{title} | ||
</h1> | ||
<BackButton path={backButtonPath} /> | ||
</div> | ||
<div className="px-6 pt-6 bg-white border border-gray-200 rounded-lg shadow-sm 2xl:col-span-2 dark:border-gray-700 dark:bg-gray-800"> | ||
<p className="text-gray-900 text-xl text-start font-medium dark:text-white"> | ||
Select the appropriate action | ||
</p> | ||
<div className="grid grid-cols-1 lg:grid-cols-3 gap-8 pb-16 pt-12"> | ||
{options.map((option) => ( | ||
<Card | ||
key={option.heading} | ||
className={`${ | ||
option.path | ||
? 'custom-card group transform transition duration-500 ease-in-out overflow-hidden overflow-ellipsis border border-gray-200 shadow-md hover:scale-105 cursor-pointer dark:hover:bg-primary-700 hover:bg-primary-700' | ||
: 'cursor-not-allowed bg-gray-300 text-gray-500 dark:border-gray-600 dark:bg-gray-700' | ||
}`} | ||
style={{ | ||
maxHeight: '100%', | ||
overflow: 'auto', | ||
height: '168px', | ||
color: 'inherit', | ||
}} | ||
onClick={() => option.path && (window.location.href = option.path)} | ||
> | ||
<div | ||
className={`flex items-center min-[401px]:flex-nowrap flex-wrap ${ | ||
option.path ? 'group-hover:text-white' : '' | ||
}`} | ||
style={{ color: 'inherit' }} | ||
> | ||
<div className="ml-4"> | ||
<h5 | ||
className={`text-2xl font-semibold ${ | ||
option.path | ||
? 'text-primary-700 dark:text-white group-hover:text-white' | ||
: 'text-gray-500' | ||
} pb-2`} | ||
> | ||
{option.heading} | ||
</h5> | ||
<p | ||
className={`text-sm ${ | ||
option.path | ||
? 'text-gray-700 dark:text-white group-hover:text-white' | ||
: 'text-gray-500' | ||
}`} | ||
> | ||
{option.description} | ||
</p> | ||
</div> | ||
</div> | ||
</Card> | ||
))} | ||
</div> | ||
</div> | ||
</div> | ||
); | ||
}; | ||
|
||
export default Dashboard; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { pathRoutes } from '../../config/pathRoutes'; | ||
import Dashboard from '../../commonComponents/Dashboard'; | ||
|
||
const VerificationDashboard = () => { | ||
const options = [ | ||
{ | ||
heading: 'Connection', | ||
description: 'Verify credential(s) by selecting existing connections', | ||
path: pathRoutes.organizations.verification.schema, | ||
}, | ||
{ | ||
heading: 'Email', | ||
description: 'Verify credential(s) by entering email ID for specific user', | ||
path: null, | ||
}, | ||
{ | ||
heading: 'Bulk', | ||
description: 'Verify credential(s) in bulk by uploading .csv file records', | ||
path: null, | ||
}, | ||
]; | ||
|
||
return ( | ||
<Dashboard | ||
title="Verify Credential" | ||
options={options} | ||
backButtonPath={pathRoutes.organizations.issuedCredentials} | ||
/> | ||
); | ||
}; | ||
|
||
export default VerificationDashboard; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
...anizations/verification/verify-credentials/email/schemas/cred-defs/attributes/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
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> |
18 changes: 18 additions & 0 deletions
18
src/pages/organizations/verification/verify-credentials/email/schemas/cred-defs/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
import LayoutSidebar from "../../../../../../../app/LayoutSidebar.astro"; | ||
import CredDefSelection from "../../../../../../../components/Verification/CredDefSelection"; | ||
// 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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
17 changes: 17 additions & 0 deletions
17
...s/organizations/verification/verify-credentials/schemas/cred-defs/connections/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
import LayoutSidebar from "../../../../../../../app/LayoutSidebar.astro"; | ||
import Connections from "../../../../../../../components/Verification/Connections"; | ||
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}> | ||
<Connections client:load/> | ||
</LayoutSidebar> |
9 changes: 5 additions & 4 deletions
9
.../cred-defs/connections/verification.astro → .../cred-defs/connections/verification.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
16 changes: 16 additions & 0 deletions
16
src/pages/organizations/verification/verify-credentials/schemas/cred-defs/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
--- | ||
import { checkUserSession } from '../../../../../../utils/check-session'; | ||
import { pathRoutes } from '../../../../../../config/pathRoutes'; | ||
import LayoutSidebar from '../../../../../../app/LayoutSidebar.astro'; | ||
import CredDefSelection from '../../../../../../components/Verification/CredDefSelection'; | ||
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}> | ||
<CredDefSelection client:load /> | ||
</LayoutSidebar> |
17 changes: 17 additions & 0 deletions
17
src/pages/organizations/verification/verify-credentials/schemas/index.astro
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
import LayoutSidebar from "../../../../../app/LayoutSidebar.astro"; | ||
import SchemaSelection from "../../../../../components/Verification/SchemaSelection"; | ||
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}> | ||
<SchemaSelection client:load/> | ||
</LayoutSidebar> |