Skip to content

Commit

Permalink
Merge pull request #524 from credebl/refactor-issuance-api
Browse files Browse the repository at this point in the history
refactor: Out of band issuance via email
  • Loading branch information
vivekayanworks authored Feb 7, 2024
2 parents 4b43836 + d2e1ac0 commit a7d2983
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 60 deletions.
4 changes: 4 additions & 0 deletions src/common/global.css
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,10 @@ ul.timelinestatic {
@apply dark:!text-white !text-primary-700 w-fit;
}

.email-bulk-issuance .select__single-value{
width: calc(100% - 15px) !important;
}

.select__value-container
.select__value-container--has-value
.select__single-value {
Expand Down
112 changes: 53 additions & 59 deletions src/components/Issuance/EmailIssuance.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ const EmailIssuance = () => {
}}
/>
</div>
<div className="flex flex-col justify-between gap-4">
<div className="flex flex-col justify-between gap-4 email-bulk-issuance">
<Card>
<div className="md:min-h-[10rem]">
<p className="text-xl pb-6 font-semibold dark:text-white">
Expand Down Expand Up @@ -357,15 +357,9 @@ const EmailIssuance = () => {
</div>
</div>
</Card>
<div
className={`${
isCredSelected ? '' : 'md:h-[300px] '
} flex flex-col justify-between w-full`}
>
<div>
<Card>
<div
className={`${isCredSelected ? '' : 'md:h-[300px] '} w-full`}
>
<div>
<div className="flex justify-between mb-4 items-center ml-1">
<div>
<p className="text-xl font-semibold dark:text-white">
Expand Down Expand Up @@ -478,47 +472,47 @@ const EmailIssuance = () => {
{arrayHelpers.form
.values.formData
.length > 1 && (
<div
key={index}
className="sm:w-2/12 text-red-600 flex justify-end"
>
<Button
data-testid="deleteBtn"
type="button"
color="danger"
onClick={() =>
arrayHelpers.remove(
index,
)
}
disabled={
arrayHelpers
.form.values
.formData
.length ===
1
}
className={` dark:bg-gray-700 flex justify-end focus:ring-0`}
<div
key={index}
className="sm:w-2/12 text-red-600 flex justify-end"
>
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={
1.5
<Button
data-testid="deleteBtn"
type="button"
color="danger"
onClick={() =>
arrayHelpers.remove(
index,
)
}
stroke="currentColor"
className="w-6 h-6"
disabled={
arrayHelpers
.form.values
.formData
.length ===
1
}
className={` dark:bg-gray-700 flex justify-end focus:ring-0`}
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"
/>
</svg>
</Button>
</div>
)}
<svg
xmlns="http://www.w3.org/2000/svg"
fill="none"
viewBox="0 0 24 24"
strokeWidth={
1.5
}
stroke="currentColor"
className="w-6 h-6"
>
<path
strokeLinecap="round"
strokeLinejoin="round"
d="M14.74 9l-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 01-2.244 2.077H8.084a2.25 2.25 0 01-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 00-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 013.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 00-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 00-7.5 0"
/>
</svg>
</Button>
</div>
)}
</div>

<label className="w-20 font-semibold text-base dark:text-white">
Expand All @@ -539,18 +533,18 @@ const EmailIssuance = () => {
| ReactNode
| string;
name:
| string
| number
| boolean
| React.ReactElement<
any,
| string
| number
| boolean
| React.ReactElement<
any,
| string
| React.JSXElementConstructor<any>
>
| Iterable<React.ReactNode>
| React.ReactPortal
| null
| undefined;
| React.JSXElementConstructor<any>
>
| Iterable<React.ReactNode>
| React.ReactPortal
| null
| undefined;
schemaDataType: any;
},
attIndex: any,
Expand Down Expand Up @@ -589,7 +583,7 @@ const EmailIssuance = () => {
.length,
),
) *
10 +
10 +
28,
}}
>
Expand Down
2 changes: 1 addition & 1 deletion src/config/apiRoutes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export const apiRoutes = {
getIssuedCredentials: '/credentials',
getAllConnections: '/connections',
issueCredential: '/credentials/offer',
issueOobEmailCredential: '/credentials/oob',
issueOobEmailCredential: '/credentials/oob/email',
bulk:{
credefList:'/bulk/cred-defs',
uploadCsv: '/bulk/upload',
Expand Down

0 comments on commit a7d2983

Please sign in to comment.