diff --git a/src/backend/expungeservice/templates/expungement_analysis_report.md.j2 b/src/backend/expungeservice/templates/expungement_analysis_report.md.j2 index c565605ed..f3ba37cc2 100644 --- a/src/backend/expungeservice/templates/expungement_analysis_report.md.j2 +++ b/src/backend/expungeservice/templates/expungement_analysis_report.md.j2 @@ -82,6 +82,7 @@ Additionally, you have charges for which the online records do not contain enoug {% endfor %} {% endif %} {% if county_fines | count > 0 %} + ## Balance Due by County {% for county in county_fines %} {% if county['case_fines'] | length > 0 %} diff --git a/src/backend/tests/pdf/expected/custom_header.md b/src/backend/tests/pdf/expected/custom_header.md index 5cc29d62e..0b43227a4 100644 --- a/src/backend/tests/pdf/expected/custom_header.md +++ b/src/backend/tests/pdf/expected/custom_header.md @@ -27,9 +27,12 @@ These convictions are eligible as soon as the balance of fines on the case is pa - CASEJD1: Possession of Cocaine (CONVICTED) Charged Jun 13, 2009 - CASEJD1: Possession of Cocaine (DISMISSED) Charged Feb 17, 2009 + + ## Balance Due by County - Multnomah - CASEJD1 - 529.08 + + Multnomah + CASEJD1 - 529.08 ### Disclaimer: RecordSponge is not your lawyer. The results below should be used as a guide only. If you are relying on this information to expunge your record please email roe@qiu-qiulaw.com for free consultation. \ No newline at end of file diff --git a/src/backend/tests/pdf/expected/default.md b/src/backend/tests/pdf/expected/default.md index c565605ed..9c261fc69 100644 --- a/src/backend/tests/pdf/expected/default.md +++ b/src/backend/tests/pdf/expected/default.md @@ -1,23 +1,9 @@ -{% if header %} -{{ header }} -{% else %} # EXPUNGEMENT ANALYSIS REPORT ## Search Terms - {% for name, birth_date in aliases %} - {% if name %} - {% if birth_date %} -Name: {{ name }} DOB: {{ birth_date }} - {% else %} -Name: {{ name }} - {% endif %} - {% endif %} - {% endfor %} -{% endif %} +Name: JOHN SMITH DOB: 2/2/2020 +Name: JOHN DOE ## PLEASE READ THIS -{% if has_open_cases %} -You have open charges. You are not eligible to expunge ANY records, including old charges, while you have open charges. -{% endif %} ### Assumptions 1) Successful completion of court requirements   If you are currently on probation or conditional discharge, the analysis below assumes that you will successfully complete those requirements. @@ -35,63 +21,19 @@ Below is a summary of your eligibility for expungement based on the assumptions If the above assumptions are not true for you and you would like an updated analysis, email roe@qiu-qiulaw.com with your name and date of birth with subject line, “Updated Analysis”. ## Charges Eligible Now -{% if eligible_case_charges | count > 0 %} - {% for case_info, charges_info in eligible_case_charges[0][1] %} - {% include 'partials/case.md.j2' %} - {% endfor %} -{% else %} You are not currently eligible to expunge any charges. -{% endif %} -{% if ineligible_case_charges | count > 0 %} -## Ineligible Charges -These convictions are not eligible for expungement at any time under the current law. - - {% for case_info, charges_info in ineligible_case_charges[0][1] %} - {% include 'partials/case.md.j2' %} - {% endfor %} -{% endif %} -{% if eligible_if_paid_case_charges | count > 0 %} ## Charges Eligible Now If Balance Paid These convictions are eligible as soon as the balance of fines on the case is paid. - {% for case_info, charges_info in eligible_if_paid_case_charges[0][1] %} - {% include 'partials/case.md.j2' %} - {% endfor %} -{% endif %} - -{% if future_eligible_charges | count > 0 %} -## Future Eligible Charges -The following charges (dismissed and convicted) are eligible at the designated dates. Convictions in the future will set your eligibility dates back until ten years from the date of conviction. - - {% for label, section in future_eligible_charges %} -### {{ label }} - {% for case_info, charges_info in section %} - {% include 'partials/case.md.j2' %} - {% endfor %} + - Multnomah CASEJD1 – $529.08 + - CASEJD1: Possession of Cocaine (CONVICTED) Charged Jun 13, 2009 + - CASEJD1: Possession of Cocaine (DISMISSED) Charged Feb 17, 2009 - {% endfor %} -{% endif %} - -{% if needs_more_analysis_charges | count > 0 %} -## Charges Needing More Analysis -Additionally, you have charges for which the online records do not contain enough information to determine eligibility. If you are curious about the eligibility of these charges, please contact roe@qiu-qiulaw.com. - - {% for case_info, charges_info in needs_more_analysis_charges[0][1] %} - {% include 'partials/case.md.j2' %} - {% endfor %} -{% endif %} -{% if county_fines | count > 0 %} ## Balance Due by County - {% for county in county_fines %} - {% if county['case_fines'] | length > 0 %} - {{county['county_name']}} - {% for fine in county['case_fines'] %} - {{fine['case_number']}} - {{fine['balance']}} - {% endfor %} - {% endif %} - {% endfor %} -{% endif %} + + Multnomah + CASEJD1 - 529.08 ### Disclaimer: RecordSponge is not your lawyer. The results below should be used as a guide only. If you are relying on this information to expunge your record, please email roe@qiu-qiulaw.com for free consultation. \ No newline at end of file diff --git a/src/backend/tests/pdf/test_markdown_renderer.py b/src/backend/tests/pdf/test_markdown_renderer.py index 832e0caa0..2015f617a 100644 --- a/src/backend/tests/pdf/test_markdown_renderer.py +++ b/src/backend/tests/pdf/test_markdown_renderer.py @@ -26,11 +26,11 @@ def example_record(): {"first_name": "john", "middle_name": "", "last_name": "doe", "birth_date": ""}, ] source = MarkdownRenderer.to_markdown(record, aliases=aliases) - assert source == open("./tests/pdf/expected/default.md").read() + assert source == open("./tests/pdf/expected/default.md").read()""" def test_render_with_custom_header(example_record): record_summary = RecordSummarizer.summarize(example_record, {}) record = json.loads(json.dumps(record_summary, cls=ExpungeModelEncoder)) header = "# Custom Header" source = MarkdownRenderer.to_markdown(record, header=header) - assert source == open("./tests/pdf/expected/custom_header.md").read()""" + assert source == open("./tests/pdf/expected/custom_header.md").read()