-
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.
fix: routes changes for verifcation with email flow (#739)
* refactor: parameter name Signed-off-by: bhavanakarwade <[email protected]> * refactor: added query parameter Signed-off-by: bhavanakarwade <[email protected]> * fix: remove unnecessary code Signed-off-by: bhavanakarwade <[email protected]> * fix: query param issue Signed-off-by: bhavanakarwade <[email protected]> * fix: css issues Signed-off-by: bhavanakarwade <[email protected]> * fix: create did button restrictions Signed-off-by: bhavanakarwade <[email protected]> --------- Signed-off-by: bhavanakarwade <[email protected]>
- Loading branch information
1 parent
a22ec34
commit 48b580b
Showing
13 changed files
with
79 additions
and
103 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 |
---|---|---|
@@ -1,54 +1,46 @@ | ||
import { Card } from 'flowbite-react'; | ||
import CopyDid from '../../commonComponents/CopyDid'; | ||
|
||
interface AttributesListProps { | ||
attributeDataList: { entity: string; properties: any[] }[] | ||
attributeDataList: { [key: string]: any }[] | ||
} | ||
|
||
const AttributesListData = ({attributeDataList}: AttributesListProps): JSX.Element => { | ||
return ( | ||
<> | ||
<Card > | ||
<div className="flex h-full flex-col justify-center gap-0 sm:p-0"> | ||
<div className="flex border-b"> | ||
<div className="w-5/12 font-semibold flex truncate md:pl-1 sm:mr-8 md:mr-0 text-primary-700 dark:bg-gray-800 text-xl"> | ||
Attributes | ||
</div> | ||
<div className="w-1/12 font-semibold flex justify-start truncate md:pl-1 sm:mr-8 md:mr-0 text-primary-700 dark:bg-gray-800 text-xl"> | ||
</div> | ||
<div className="w-6/12 font-semibold flex truncate sm:pl-4 text-primary-700 dark:bg-gray-800 text-xl"> | ||
{' '} | ||
Values | ||
</div> | ||
</div> | ||
const AttributesListData = ({ attributeDataList }: AttributesListProps): JSX.Element => { | ||
|
||
{ | ||
attributeDataList?.map((item, index) => ( | ||
<div | ||
key={item?.entity + 1} | ||
className="flex w-full" | ||
> | ||
<div | ||
className={`flex w-full text-lg`} | ||
> | ||
<div className="w-5/12 m-1 p-1 text-start text-gray-700 dark:text-white text-lg"> | ||
{item?.entity} | ||
</div> | ||
<div className="w-1/12 m-1 p-1 flex items-center text-gray-700 dark:text-white text-lg"> | ||
: | ||
</div> | ||
<div className="w-6/12 m-1 truncate p-1 flex justify-start text-gray-700 dark:text-white text-lg"> | ||
{item?.properties.join(', ')} | ||
return ( | ||
<> | ||
{attributeDataList?.map((item, index) => ( | ||
<Card key={index} className="mb-4"> | ||
<div className="flex flex-col justify-start gap-2 p-4"> | ||
<div className="flex justify-start text-xl font-semibold text-gray-900 dark:text-white mb-2"> | ||
{`Credential ${index + 1}`} | ||
</div> | ||
|
||
|
||
{Object.entries(item).map(([key, value], idx) => ( | ||
<div key={idx} className="flex w-full text-lg items-center"> | ||
<div className="w-3/12 font-semibold text-primary-700 dark:bg-gray-800 m-1 p-1 flex justify-start items-center text-start"> | ||
{key} | ||
</div> | ||
<div className="flex items-center p-1 m-1"> | ||
: | ||
</div> | ||
<div className="w-9/12 m-1 text-start text-gray-600 dark:text-white items-center cursor-pointer overflow-auto"> | ||
{key === 'schemaId' || key === 'credDefId' ? ( | ||
<div className="flex items-center"> | ||
<CopyDid value={value} className="truncate font-courier mt-2" /> | ||
</div> | ||
</div> | ||
) : ( | ||
<span className="truncate font-courier">{value}</span> | ||
)} | ||
</div> | ||
)) | ||
} | ||
|
||
</div> | ||
))} | ||
</div> | ||
</Card> | ||
))} | ||
</> | ||
); | ||
} | ||
|
||
</> | ||
) | ||
} | ||
|
||
export default AttributesListData; | ||
export default AttributesListData; |
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
14 changes: 0 additions & 14 deletions
14
src/pages/organizations/verification/verify-credentials/email/index.astro
This file was deleted.
Oops, something went wrong.
15 changes: 0 additions & 15 deletions
15
...tion/verify-credentials/email/schemas/cred-defs/attributes/verification-email/index.astro
This file was deleted.
Oops, something went wrong.
6 changes: 3 additions & 3 deletions
6
.../schemas/cred-defs/attributes/index.astro → ...credentials/schema/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
7 changes: 2 additions & 5 deletions
7
...tials/email/schemas/cred-defs/index.astro → ...attributes/verification-email/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 |
---|---|---|
@@ -1,17 +1,14 @@ | ||
--- | ||
import LayoutSidebar from "../../../../../../../app/LayoutSidebar.astro"; | ||
import EmailCredDefSelection from "../../../../../../../components/Verification/EmailCredDefSelection"; | ||
import { pathRoutes } from "../../../../../../../config/pathRoutes"; | ||
import EmailVerification from "../../../../../../../components/Verification/EmailVerification"; | ||
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/> | ||
<EmailVerification client:load /> | ||
</LayoutSidebar> |
File renamed without changes.
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
src/pages/organizations/verification/verify-credentials/schema/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 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> |