Skip to content

Commit

Permalink
21768 Emailer - stage 1 overdue transition notification (#2867)
Browse files Browse the repository at this point in the history
* Add no transition email template

* Update invol dissolution email template

* Clean up code changes

* Add unit test
  • Loading branch information
leodube-aot authored Jul 31, 2024
1 parent 82a15e1 commit 9dd9643
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ def process(email_info: dict, token: str) -> dict: # pylint: disable=too-many-l
furnishing = Furnishing.find_by_id(furnishing_id)
business = furnishing.business
business_identifier = business.identifier
# get template
template = Path(
f'{current_app.config.get("TEMPLATE_PATH")}/INVOL-DIS-STAGE-1.html'
).read_text()
Expand All @@ -57,7 +58,8 @@ def process(email_info: dict, token: str) -> dict: # pylint: disable=too-many-l
html_out = jnja_template.render(
business=business.json(),
entity_dashboard_url=get_entity_dashboard_url(business_identifier, token),
extra_provincials=extra_provincials
extra_provincials=extra_provincials,
furnishing_name=furnishing.furnishing_name
)
# get recipients
recipients = []
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,19 +23,36 @@

[[20px.html]]

{% if 'NO_AR' in furnishing_name %}
<p>Your business is in the process of being dissolved because it hasn't
filed its required annual reports. Please file your overdue annual
reports as soon as possible by <a href="{{ entity_dashboard_url }}">logging into your Business Page</a>.
</p>
{% else %}
<p>Your business is in the process of being dissolved because it hasn't
filed its required Post Restoration Transition Application (PRTA).
Please file your overdue PRTA as soon as possible by <a href="{{ entity_dashboard_url }}">logging into
your Business Page</a>.
</p>
{% endif %}

[[whitespace-16px.html]]

{% if 'NO_AR' in furnishing_name %}
<p>
Under the Business Corporations Act, if you don't file these reports
within one month from today, the Registrar will post a public notice
on <a href="https://www.bclaws.gov.bc.ca/">www.bclaws.ca</a>. This notice will state that your company may be
dissolved if the annual reports aren't filed after one month.
</p>
{% else %}
<p>
Under the Business Corporations Act, if you don't file your PRTA
within one month from today, the Registrar will post a public notice
on <a href="https://www.bclaws.gov.bc.ca/">www.bclaws.ca</a>. This notice will state that your company may be
dissolved if the PRTA aren't filed after one month.
</p>
{% endif %}

[[whitespace-16px.html]]

Expand Down
17 changes: 17 additions & 0 deletions queue_services/entity-emailer/tests/unit/test_tracker.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,23 @@
}
}
}),
('f36e3af7-90c3-4859-a6f6-2feefbdc1e30',
{
'specversion': '1.x-wip',
'type': 'bc.registry.dissolution',
'source': 'furnishingsJob',
'id': 'f36e3af7-90c3-4859-a6f6-2feefbdc1e30',
'time': '',
'datacontenttype': 'application/json',
'identifier': 'BC123223',
'data': {
'furnishing': {
'type': 'INVOLUNTARY_DISSOLUTION',
'furnishingId': 1,
'furnishingName': 'DISSOLUTION_COMMENCEMENT_NO_TR'
}
}
}),
('bc.registry.affiliation_1',
{
'type': 'bc.registry.affiliation',
Expand Down
2 changes: 1 addition & 1 deletion queue_services/entity-emailer/tests/unit/test_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ def test_send_email_with_incomplete_payload(app, session, email_msg):
])
def test_involuntary_dissolution_stage_1_notification(app, db, session, mocker, test_name,
exception, furnishing_name, expected_furnishing_status):
"""Assert that the stage 1 overdue ARs notification can be processed."""
"""Assert that the stage 1 notifications can be processed."""
business_identifier = 'BC1234567'
business = create_business(business_identifier, 'BC', 'Test Business')
furnishing = create_furnishing(session, business=business)
Expand Down

0 comments on commit 9dd9643

Please sign in to comment.