diff --git a/Methodology Library/International Renewable Energy Certificate (iREC)/Policies/iRec Policy 4 (Additional Data).policy b/Methodology Library/International Renewable Energy Certificate (iREC)/Policies/iRec Policy 4 (Additional Data).policy new file mode 100644 index 0000000000..4048b743a0 Binary files /dev/null and b/Methodology Library/International Renewable Energy Certificate (iREC)/Policies/iRec Policy 4 (Additional Data).policy differ diff --git a/common/src/hedera-modules/vcjs/vcjs.ts b/common/src/hedera-modules/vcjs/vcjs.ts index f44dd030f0..cd2ed05ec3 100644 --- a/common/src/hedera-modules/vcjs/vcjs.ts +++ b/common/src/hedera-modules/vcjs/vcjs.ts @@ -80,6 +80,14 @@ export interface IDocumentOptions { * UUID */ uuid?: string; + /** + * Evidence entries to embed in the VC before signing + */ + evidence?: { type: string[]; dataType: string; data: string }[]; + /** + * JSON-LD context URL for evidence entries + */ + evidenceContext?: string; } /** @@ -680,6 +688,14 @@ export class VCJS { } else { vc.setIssuer(new Issuer(didDocument.getDid())); } + if (documentOptions?.evidenceContext) { + vc.addContext(documentOptions.evidenceContext); + } + if (documentOptions?.evidence?.length) { + for (const entry of documentOptions.evidence) { + vc.addEvidence(entry); + } + } return await this.issueVerifiableCredential(vc, didDocument, signatureType, documentOptions); } diff --git a/frontend/src/app/modules/common/policy-comments/_toolbar-files.scss b/frontend/src/app/modules/common/policy-comments/_toolbar-files.scss new file mode 100644 index 0000000000..4e98c047d8 --- /dev/null +++ b/frontend/src/app/modules/common/policy-comments/_toolbar-files.scss @@ -0,0 +1,100 @@ +.toolbar-files { + margin-top: 8px; + display: flex; + flex-direction: row; + flex-wrap: wrap; + gap: 6px; + + .toolbar-file { + height: 32px; + display: flex; + flex-direction: row; + align-items: center; + border: 1px solid var(--primary-primary, #4169E2); + background: #f0f3fc; + border-radius: 6px; + font-family: Inter, sans-serif; + font-weight: 500; + font-size: 12px; + line-height: 14px; + vertical-align: middle; + overflow: hidden; + + .toolbar-file-icon { + height: 30px; + width: 30px; + min-width: 30px; + padding: 7px; + overflow: hidden; + } + + .toolbar-file-loading, + .guardian-loading { + position: relative !important; + width: 30px !important; + height: 30px !important; + padding: 6px !important; + background: transparent !important; + + .guardian-loading-image { + width: 20px !important; + height: 20px !important; + } + } + + .toolbar-file-metadata { + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + + .file-name { + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + height: 30px; + line-height: 30px; + } + } + + .toolbar-file-name { + flex: 1; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + padding: 0 8px; + line-height: 30px; + } + + .toolbar-file-action { + height: 30px; + width: 30px; + min-width: 30px; + padding: 7px; + background: #f0f3fc; + cursor: pointer; + + &:hover { + background: #dce0ea; + } + } + } + + .toolbar-file-more { + border: 1px solid var(--primary-primary, #4169E2); + height: 32px; + width: 32px; + border-radius: 8px; + font-family: Inter, sans-serif; + font-weight: 500; + font-size: 12px; + line-height: 14px; + vertical-align: middle; + color: var(--primary-primary, #4169E2); + display: flex; + justify-content: center; + align-items: center; + overflow: hidden; + user-select: none; + } +} diff --git a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html index 0c00f890fe..99e846f7fa 100644 --- a/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html +++ b/frontend/src/app/modules/policy-engine/policy-configuration/blocks/documents/request-addon-config/request-addon-config.component.html @@ -83,7 +83,25 @@ - Enable additional data + + + + + + + + - Enable additional data + + + + + + + + Test -
+
1
Fill Form
-
-
-
2
-
Configure Relayer Account
-
- + +
+
+
2
+
Add Evidence Attachments
+
+
+ +
+
+
{{enableAdditionalData ? 3 : 2}}
+
Configure Relayer Account
+
+
@@ -100,7 +104,32 @@
-
+
+
+ +
+
+
+
+
{{ file.name }}
+
+ +
+
+
+
+ +
+
+
-