From 9265bb34f91c9228a4ca9250080cf7e6237a5a44 Mon Sep 17 00:00:00 2001 From: Siyasanga Date: Tue, 4 Nov 2025 16:12:41 +0200 Subject: [PATCH 1/2] Expose collector form field values to svg The handlebars context had no access to the collector form's values --- CHANGELOG.md | 1 + .../features/events/actions/print-certificate/Review.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 213b5e3a42e..617be97f737 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,7 @@ This version enforces environment to have Node 22 installed (supported until 30 April 2027) and removes support for Node 18 for better performance and using [new features](https://github.com/nodejs/node/releases/tag/v22.0.0) offered by NodeJS - Use nvm to upgrade your local development environment to use node version `22.x.x.` + - Add collector form fields to the handlebars context so that helper can have logic targeting collector form values - **UI enhancements** diff --git a/packages/client/src/v2-events/features/events/actions/print-certificate/Review.tsx b/packages/client/src/v2-events/features/events/actions/print-certificate/Review.tsx index cc50772abc3..3c24e2f7c8f 100644 --- a/packages/client/src/v2-events/features/events/actions/print-certificate/Review.tsx +++ b/packages/client/src/v2-events/features/events/actions/print-certificate/Review.tsx @@ -203,7 +203,7 @@ export function Review() { createdByRole: userFromUsersList.role, status: 'Accepted', declaration: {}, - annotation: null, + annotation, originalActionId: null, createdBySignature: userFromUsersList.signature, createdAtLocation: userDetails.primaryOffice.id as UUID, From 22b23a78fa5bdbb046f9cd35f9140eefebdb0074 Mon Sep 17 00:00:00 2001 From: Siyasanga Date: Tue, 4 Nov 2025 17:03:28 +0200 Subject: [PATCH 2/2] Add annotation field to the $lookup helper's resolved actions The $action helper returns the action object for the PRINT_CERTIFICATE action. However, when $lookup tried to resolve properties from that action object, it was creating a resolvedAction object that didn't include the annotation field, even though annotation is a valid property of all actions (it's defined in the ActionBase schema). --- .../features/events/actions/print-certificate/pdfUtils.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/client/src/v2-events/features/events/actions/print-certificate/pdfUtils.ts b/packages/client/src/v2-events/features/events/actions/print-certificate/pdfUtils.ts index 7504d33002b..20545fcf7f0 100644 --- a/packages/client/src/v2-events/features/events/actions/print-certificate/pdfUtils.ts +++ b/packages/client/src/v2-events/features/events/actions/print-certificate/pdfUtils.ts @@ -363,7 +363,8 @@ export function compileSvg({ adminLevels } ), - createdByRole: action.data.createdByRole + createdByRole: action.data.createdByRole, + annotation: action.data.annotation } return getMixedPath(resolvedAction, propertyPath)