From 1f484fcab00dd8962015e4d6d268e43d6d09dec9 Mon Sep 17 00:00:00 2001 From: Bryan Frimin Date: Fri, 20 Feb 2026 10:15:42 +0100 Subject: [PATCH] Style Signed-off-by: Bryan Frimin --- apps/trust/src/pages/NDAPage.tsx | 2 +- pkg/esign/certgen.go | 13 +- pkg/esign/certificate.html.tmpl | 261 +++++++++++++++---------------- pkg/html2pdf/converter.go | 20 +-- 4 files changed, 147 insertions(+), 149 deletions(-) diff --git a/apps/trust/src/pages/NDAPage.tsx b/apps/trust/src/pages/NDAPage.tsx index d5f40f5e8..1c45c1a1b 100644 --- a/apps/trust/src/pages/NDAPage.tsx +++ b/apps/trust/src/pages/NDAPage.tsx @@ -132,7 +132,7 @@ export function NDAPage(props: { useEffect(() => { if (isCompleted) { - navigate("/overview", { replace: true }); + void navigate("/overview", { replace: true }); } }, [isCompleted, navigate]); diff --git a/pkg/esign/certgen.go b/pkg/esign/certgen.go index 37a90d562..135ed4b64 100644 --- a/pkg/esign/certgen.go +++ b/pkg/esign/certgen.go @@ -133,12 +133,13 @@ func (g *CertificateGenerator) Generate( ctx, htmlBuf.Bytes(), html2pdf.RenderConfig{ - PageFormat: html2pdf.PageFormatA4, - Orientation: html2pdf.OrientationPortrait, - MarginTop: html2pdf.NewMarginMillimeters(20), - MarginBottom: html2pdf.NewMarginMillimeters(20), - MarginLeft: html2pdf.NewMarginMillimeters(20), - MarginRight: html2pdf.NewMarginMillimeters(20), + PageFormat: html2pdf.PageFormatA4, + Orientation: html2pdf.OrientationPortrait, + MarginTop: html2pdf.NewMarginMillimeters(20), + MarginBottom: html2pdf.NewMarginMillimeters(20), + MarginLeft: html2pdf.NewMarginMillimeters(20), + MarginRight: html2pdf.NewMarginMillimeters(20), + PrintBackground: true, }, ) if err != nil { diff --git a/pkg/esign/certificate.html.tmpl b/pkg/esign/certificate.html.tmpl index 76c07fedc..cf3874317 100644 --- a/pkg/esign/certificate.html.tmpl +++ b/pkg/esign/certificate.html.tmpl @@ -3,6 +3,15 @@ - -
-
-
Certificate Of Completion
-
-
-
probo
-
+ +
+ + + + + + + + + + + + + + + + + +
- -
-
- Signature Id: {{.SignatureID}} -
-
- Status: Completed -
-
+ + + + + +
Certificate Of Completion
- -
- Subject: {{.DocumentTypeName}} -
- - -
-
-
Document Type: {{.DocumentType}}
-
File Hash (SHA-256):
-
{{.FileHash}}
-
-
-   -
-
-
Organization Id:
-
{{.OrganizationID}}
-
File Id:
-
{{.FileID}}
-
-
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
StatusCompleted
Subject{{.DocumentTypeName}}
Document Type{{.DocumentType}}
Signature Id{{.SignatureID}}
Organization Id{{.OrganizationID}}
File Id{{.FileID}}
File Hash (SHA-256){{.FileHash}}
- - +
Signer EventsTimestampSigner
- - + + + + + + + + + + + + + + + + + + + + + + + + + +
-
{{.SignerFullName}}
-
{{.SignerEmail}}
-
Security Level: Email, Account Authentication
-
Using IP Address: {{.SignerIPAddress}}
-
- Electronic Record and Signature Disclosure:
- Accepted -
-
-
Signed: {{.SignedAt}}
-
- User Agent: {{.SignerUserAgent}} -
-
Name{{.SignerFullName}}
Email{{.SignerEmail}}
Signed At{{.SignedAt}}
Security LevelEmail, Account Authentication
IP Address{{.SignerIPAddress}}
User Agent{{.SignerUserAgent}}
ERSD ConsentAccepted
diff --git a/pkg/html2pdf/converter.go b/pkg/html2pdf/converter.go index c1487899d..4bedce6ea 100644 --- a/pkg/html2pdf/converter.go +++ b/pkg/html2pdf/converter.go @@ -173,16 +173,16 @@ func (c *Converter) GeneratePDF(ctx context.Context, htmlDocument []byte, cfg Re chromedp.ActionFunc( func(ctx context.Context) (err error) { pdfBytes, _, err = page.PrintToPDF(). - WithPrintBackground(cfg.PrintBackground). - WithPaperWidth(width). - WithPaperHeight(height). - WithMarginTop(marginTop). - WithMarginBottom(marginBottom). - WithMarginLeft(marginLeft). - WithMarginRight(marginRight). - WithScale(scale). - WithPreferCSSPageSize(false). - Do(ctx) + WithPrintBackground(cfg.PrintBackground). + WithPaperWidth(width). + WithPaperHeight(height). + WithMarginTop(marginTop). + WithMarginBottom(marginBottom). + WithMarginLeft(marginLeft). + WithMarginRight(marginRight). + WithScale(scale). + WithPreferCSSPageSize(false). + Do(ctx) return err },