Skip to content

Commit

Permalink
set consent flag to received so report is accurate (#1525)
Browse files Browse the repository at this point in the history
  • Loading branch information
semmatti authored Apr 29, 2024
1 parent 2901824 commit 00ea588
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions api/namex/resources/name_requests/report_resource.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def email_consent_letter(self, nr_id):
nr_model = Request.query.get(nr_id)
if not nr_model:
return jsonify(message='{nr_id} not found'.format(nr_id=nr_model.id)), HTTPStatus.NOT_FOUND
nr_model.consentFlag = 'R' # invariant: this function is only called when the consent letter has been received
report, status_code = ReportResource._get_report(nr_model)
if status_code != HTTPStatus.OK:
return jsonify(message=str(report)), status_code
Expand Down
6 changes: 6 additions & 0 deletions api/report-templates/nameRequest.html
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,15 @@
</td>
</tr>
<tr>
{% if consentFlag=='R' %}
<td class="checkbox">
<img alt="" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTFweCIgaGVpZ2h0PSIxMXB4IiB2aWV3Qm94PSIwIDAgMTEgMTEiIHZlcnNpb249IjEuMSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIiB4bWxuczp4bGluaz0iaHR0cDovL3d3dy53My5vcmcvMTk5OS94bGluayI+CiAgICA8dGl0bGU+Y2hlY2tib3gtbWFya2VkPC90aXRsZT4KICAgIDxnIGlkPSJGaW5hbC1PdXRwdXRzIiBzdHJva2U9Im5vbmUiIHN0cm9rZS13aWR0aD0iMSIgZmlsbD0ibm9uZSIgZmlsbC1ydWxlPSJldmVub2RkIj4KICAgICAgICA8ZyBpZD0iUGcxLVJlc3VsdHMtLUFwcHJvdmVkLUNvbmNlbnQtUmVjZWl2ZWQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC01MS4wMDAwM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IgaWQ9IlNoYXBlIj48L3BhdGg+CiAgICAgICAgICAgIDwvZz4KICAgICAgICA8L2c+CiAgICA8L2c+Cjwvc3ZnPg==">
</td>
{% endif %}
<td style="vertical-align: top;">
<label for="consent-box" class="section-data mt-2">
Receive confirmation that the consent letter has been accepted
Expand Down

0 comments on commit 00ea588

Please sign in to comment.