Skip to content

Conversation

@Siyasanga
Copy link
Contributor

@Siyasanga Siyasanga commented Nov 4, 2025

Addressing: #10286

Description

  • Add collector form fields to the handlebars context so that helper can have logic targeting collector form values

Checklist

  • I have linked the correct Github issue under "Development"
  • I have tested the changes locally, and written appropriate tests
  • I have tested beyond the happy path (e.g. edge cases, failure paths)
  • I have updated the changelog with this change (if applicable)
  • I have updated the GitHub issue status accordingly

Note

Expose print-certificate collector form (annotation) values to the Handlebars template context and include them in $lookup/$action resolution.

  • Client — Certificates
    • Include annotation (collector form values) in optimistic PRINT_CERTIFICATE action in packages/client/src/v2-events/features/events/actions/print-certificate/Review.tsx.
    • Expose action.data.annotation in Handlebars $lookup/$action context within packages/client/src/v2-events/features/events/actions/print-certificate/pdfUtils.ts, enabling templates to reference collector form fields.
  • Changelog
    • Note added: expose collector form fields to Handlebars context.

Written by Cursor Bugbot for commit 3851d99. This will update automatically on new commits. Configure here.

@Siyasanga Siyasanga self-assigned this Nov 4, 2025
createdByRole: userFromUsersList.role,
status: 'Accepted',
declaration: {},
annotation: null,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass annotation through here instead please. This should then be the only change needed

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. I've also had to include the annotation field in the $lookup() logic see last commit

@Siyasanga Siyasanga force-pushed the Add-collector-form-field-to-handlebars-context branch from 24b4593 to 34d3632 Compare November 4, 2025 13:50
The handlebars context had no access to the collector form's values
@Siyasanga Siyasanga force-pushed the Add-collector-form-field-to-handlebars-context branch from 34d3632 to 9265bb3 Compare November 4, 2025 14:13
@Siyasanga Siyasanga marked this pull request as ready for review November 4, 2025 14:15
Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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).
@Siyasanga Siyasanga mentioned this pull request Nov 5, 2025
16 tasks
@Siyasanga Siyasanga force-pushed the Add-collector-form-field-to-handlebars-context branch from 3e992db to 22b23a7 Compare November 6, 2025 07:19
@github-actions
Copy link

github-actions bot commented Dec 5, 2025

This PR has been marked with label stale Since it has been inactive for 20 days. It will automatically be closed in 10 days if no further activity occurs.

@github-actions github-actions bot added the Stale The pr is inactive label Dec 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stale The pr is inactive

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants