Closed FikriMilano closed 3 months ago
@pld @f-odhiambo this is a follow up ticket for PDF generation
@FikriMilano Is the question displayed against the answer or just the link id?
@ellykits I don't understand your question, could you elaborate?
@ellykits we have an HTML that wants to get answer from a link id, we declare that link id in the HTML, and once the HTML got processed, the link id will get replaced by the answer of that link id.
Hope that answers your question.
My question was whether we also display the question, as in question and answer response.
@ellykits nope, we're only displaying the answers.
We don't have a use case to render dynamic question in PDF yet (dynamic because of using cqf-expression extension to it's question text).
But if the need arises in the future, we can quite simply introduce a new tag/function that retrieves the question itself.
This is good to go, reverting milestone to today cc @pld
Let's have those loops cleaned up before merge, moving to sprint 11
Describe the feature request. Create a feature that's able to:
Additional context I was initially thinking to use configuration + rules engine, but I feel it will take much more time since the implementation of those 2 need to be refactored first before it can be used by this feature. So, that's why I create a new class then do some simple string manipulation to the html.
Acceptance criteria
If the answer is not empty: "@is-not-empty('link-id')
Text
@is-not-empty" ->Text
"/ul>@answer-as-list('link-id')</ul" ->
"p>@answer('link-id')</p" ->
(the answer)
"p>@answer('link-id')</p" ->
14-May-2024
(if it's a date type)"
@answer('link-id','MMMM d, yyyy')
" ->May 14, 2024
"@submitted-date" -> 14-May-2024
"@submitted-date('MMMM d, yyyy')" -> May 14, 2024