Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update how form answer PDFs are rendered for supporters question #719

Merged
merged 2 commits into from
Aug 30, 2024

Conversation

DaniBitZesty
Copy link
Contributor

@DaniBitZesty DaniBitZesty commented Aug 29, 2024

📝 A short description of the changes

  • Letters of support questions are structured as 1 question with 2 entities. The support letters are stored within a supporter_letters_list array:
 document:
  {
   "supporter_letters_list"=>
      [
        {"support_letter_id"=>"",
         "first_name"=>"",
         "last_name"=>"",
         "relationship_to_nominee"=>"",
         "letter_of_support"=>""},
       {"support_letter_id"=>"",
         "first_name"=>"",
         "last_name"=>"",
         "relationship_to_nominee"=>"",
         "letter_of_support"=>""}
]...

  • Because the PDF generator will interpret this as one question, I am 'mocking' the question refs (C 1.1) so that the PDF version of the question looks like this:

C1. The first letter of support
C1.1. Name of the person who wrote the first letter of support

First name:

Surname:

C1.2. Relationship to group
For example, a beneficiary of the group, local resident or member of a partner charity.

C1.3. Upload the first letter of support

🔗 Link to the relevant story (or stories)

:shipit: Deployment implications

✅ Checklist

  • Features that cannot go live are behind a feature flag/env var or specify deploy date and open PR as draft
  • I have checked that commit messages make sense and explain the reasoning for each change
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have squashed any unnecessary or part-finished commits

🖼️ Screenshots (if appropriate - no PII/Prod data):

Refactor supporter_lists question refs are generated in PDF.
@DaniBitZesty DaniBitZesty merged commit 5aea8b6 into main Aug 30, 2024
5 of 6 checks passed
@DaniBitZesty DaniBitZesty deleted the letters-of-support branch August 30, 2024 11:18
This was referenced Aug 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants