s1seven / schema-tools

Tools to create, validate and render certificates using Material Identity JSON schemas
https://materialidentity.org/
Apache License 2.0
1 stars 1 forks source link

feat: add disclaimer to coa #175

Closed eamon0989 closed 2 years ago

eamon0989 commented 2 years ago

Description

This PR adds support for the property Disclaimer in the CoA. It adds support for it in the PDF rendering. Adds NaN check to localizeNumber. Adds unit tests for localizeNumber. Updates certificate.ts and schemaTypes.ts in the CoA PDF rendering package based on the new CoA schema.json. Adds Disclaimer property to fixtures. Update EN10168 v0.3.0 fixtures. Update en10168 schemaTypes.ts, update EN10168 pdf rendering. Update CoA pdf generation to fallback to CompanyName if Name is not present. Update EN10168 pdf rendering tests to use certificate v0.3.0. Add tests for createReceivers in CoA pdf rendering to test that CompanyName is correctly set as a fallback for Name. Add tests for createTransactionParties EN10168 pdf rendering to ensure that Name is correctly set as a fallback for CompanyName and it renders with and without the Email property present. Update extract-emails for updated CoA and EN10168. Update extract-emails example script. Update and add new extract-emails tests.

Related to https://github.com/thematerials-network/CoA-schemas/pull/60

Type of change

Checklist:

Updated rendering of the HTML with disclaimer section added: image

Updated PDF with disclaimer section added: image

sonarcloud[bot] commented 2 years ago

SonarCloud Quality Gate failed.    Quality Gate failed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

64.9% 64.9% Coverage
14.7% 14.7% Duplication