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

23521 - update continuation emails #3036

Merged
merged 11 commits into from
Oct 25, 2024
21 changes: 19 additions & 2 deletions queue_services/entity-emailer/q_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
affiliation_type: Final = 'bc.registry.affiliation'
dissolution_type: Final = 'bc.registry.dissolution'
bn: Final = 'businessNumber'
nr_notification: Final = 'bc.registry.names.request'


async def run(loop, email_info): # pylint: disable=too-many-locals
Expand Down Expand Up @@ -90,7 +91,7 @@ def subscription_options():
functools.partial(signal_handler, sig_loop=loop, sig_nc=nc, task=close)
)

if email_info['type'] in [affiliation_type, dissolution_type]:
if email_info['type'] in [affiliation_type, dissolution_type, nr_notification]:
payload = email_info
else:
payload = {'email': email_info}
Expand Down Expand Up @@ -122,7 +123,7 @@ def subscription_options():
identifier = arg
elif opt in ('-n', '--name'):
name = arg
if not etype or (etype not in [affiliation_type, dissolution_type, bn] and not all([fid, etype, option])):
if not etype or (etype not in [affiliation_type, dissolution_type, bn, nr_notification] and not all([fid, etype, option])):
print('q_cli.py -f <filing_id> -t <email_type> -o <option> -i <identifier>')
sys.exit()
elif etype and etype in [affiliation_type] and not all([fid, etype]):
Expand All @@ -132,6 +133,8 @@ def subscription_options():
print('q_cli.py -f <furnishing_id> -t <email_type> -i <identifier> -n <furnishing_name>')
elif etype and etype in [bn] and not all([etype, identifier]):
print('q_cli.py -t <email_type> -i <identifier>')
elif etype and etype in [nr_notification] and not all([etype, identifier, option]):
print('q_cli.py -t <email_type> -i <identifier> -o <option>')

if etype in [affiliation_type]:
msg_id = str(uuid.uuid4())
Expand Down Expand Up @@ -160,6 +163,20 @@ def subscription_options():
'identifier': identifier,
'data': {'furnishing': {'type':'INVOLUNTARY_DISSOLUTION', 'furnishingId': fid, 'furnishingName': name}},
}
elif etype in [nr_notification]:
msg_id = str(uuid.uuid4())
source = f'/requests/{identifier}'
time = datetime.utcfromtimestamp(time.time()).replace(tzinfo=timezone.utc).isoformat()
email_info = {
'specversion': '1.x-wip',
'type': etype,
'source': source,
'id': msg_id,
'time': time,
'datacontenttype': 'application/json',
'identifier': identifier,
'data': {'request': {'nrNum': identifier, 'option': option}},
}
else:
email_info = {'filingId': fid, 'type': etype, 'option': option, 'identifier': identifier}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,14 +208,20 @@ def process(email_info: dict, token: str) -> dict: # pylint: disable=too-many-l

# assign subject
legal_name = business.get('legalName', None)
if status in [Filing.Status.APPROVED.value, Filing.Status.REJECTED.value]:
subject = 'Results of your Filing from the Business Registry'
if status == Filing.Status.APPROVED.value:
subject = 'Authorization Approved'
if status == Filing.Status.REJECTED.value:
subject = 'Authorization Rejected'
elif status == Filing.Status.AWAITING_REVIEW.value:
subject = 'Authorization Documents Received'
elif status == Filing.Status.CHANGE_REQUESTED.value:
subject = 'Change Requested from the Business Registry'
subject = 'Changes Needed to Authorization'
elif status == 'RESUBMITTED':
subject = 'Authorization Updates Received'
elif status == Filing.Status.COMPLETED.value:
subject = 'Continuation Documents from the Business Registry'
elif status in [Filing.Status.PAID.value, 'RESUBMITTED']:
subject = 'Confirmation of Filing from the Business Registry'
subject = 'Successful Continuation into B.C.'
elif status == Filing.Status.PAID.value:
subject = 'Continuation Application Received'

subject = f'{legal_name} - {subject}' if legal_name else subject

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="origin-when-cross-origin"/>
<meta name="author" content="BC Registries and Online Services">
<title>Results of your Continuation Application</title>
<title>Results of your Continuation Authorization</title>
[[style.html]]
</head>

Expand All @@ -18,9 +18,10 @@

<div class="container">
<!-- first section -->
<p class="title-message bold">Results of your Continuation Application</p>
<p class="title-message bold">Results of your Continuation Authorization</p>

<p>Your Continuation Authorization is <span class="bold">approved</span>.</p>
<p>Your Continuation Authorization is <span class="bold">approved</span>. Follow the steps below to complete
your continuation application.</p>

[[20px.html]]
[[divider.html]]
Expand All @@ -30,9 +31,8 @@
<p class="title-message bold">Your Next Steps</p>

<ol class="outputs">
<li>Receive confirmation that your business has been continued in.</li>
<li>Visit <a href="{{ entity_dashboard_url }}">BC Business Registry account</a> to access
your business.</li>
<li>Return to <a href="{{ entity_dashboard_url }}">My Business Registry</a> to resume your Continuation
Application</li>
</ol>

[[20px.html]]
Expand All @@ -47,16 +47,6 @@
[[20px.html]]

<!-- fourth section -->
<p class="title-message bold">Attached to this Email</p>

<p>The following document is attached to this email:</p>
<ul class="outputs">
<li>Continuation Application</li>
</ul>

[[business-dashboard-link.html]]

<!-- fifth section -->
[[24px.html]]
[[footer.html]]
</div>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!DOCTYPE html>
<html lang="en">
<head>
<base href="/">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="origin-when-cross-origin"/>
<meta name="author" content="BC Registries and Online Services">
<title>Confirmation of Submission from the Business Registry</title>
[[style.html]]
</head>

<body>
<table class="body-table" role="presentation">
<tr>
<td>
[[header.html]]

<div class="container">
<!-- first section -->
<p class="title-message bold">We have received your Continuation Authorization documents</p>

<p>BC Registries will review your Continuation Authorization documents and contact you with the results
within 5 business days.</p>

[[20px.html]]
[[divider.html]]
[[20px.html]]

<!-- second section -->
<p class="title-message bold">Your Next Steps</p>

<p>Once your authorization has been approved, you will be notified and can then return to the BC Business
Registry to complete your continuation application.</p>

<!-- third section -->
[[continuation-application-details.html]]

[[20px.html]]
[[divider.html]]
[[20px.html]]

[[24px.html]]
[[footer.html]]
</div>
</td>
</tr>
</table>
</body>
</html>
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="origin-when-cross-origin"/>
<meta name="author" content="BC Registries and Online Services">
<title>Results of your Continuation Application</title>
<title>Continuation Authorization Results from the Business Registry</title>
[[style.html]]
</head>

Expand All @@ -18,10 +18,10 @@

<div class="container">
<!-- first section -->
<p class="title-message bold">Results of your Continuation Application</p>
<p class="title-message bold">Make changes to your Continuation Authorization</p>

<p>Your Continuation Authorization is <span class="bold">not yet approved</span>. Follow
the steps below to modify and resubmit your application.</p>
<p>BC Registries would like you to <span class="bold">make changes</span> to your Continuation
Authorization. Follow the steps below to make changes and resubmit your application.</p>

[[20px.html]]
[[divider.html]]
Expand All @@ -32,8 +32,8 @@

<p>Follow these steps to complete your application:</p>
<ol class="outputs">
<li>Visit <a href="{{ entity_dashboard_url }}">BC Business Registry account</a>.</li>
<li>Modify the application to satisfy the request from staff as described below:</li>
<li>Go to <a href="{{ entity_dashboard_url }}">My Business Registry</a>.</li>
<li>Select “Make Changes” to satisfy the request from BC Registries as described below:</li>
</ol>

<pre class="bold">{{ latest_review_comment }}</pre>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,32 @@

<div class="container">
<p class="title-message bold">
<span>You have successfully registered your business with BC Business Registry.<span>
<span>Your business has successfully continued into B.C.<span>
</p>

[[business-information.html]]

<p>The following documents are attached to this email:</p>

{% if header.isFutureEffective %}
<!-- scenario 1 -->
<ul class="outputs">
<li>Notice of Articles</li>
<li>Certificate of Continuation</li>
</ul>
{% else %}
<ul class="outputs">
<li>Notice of Articles</li>
<li>Certificate of Continuation</li>
<li>Continuation Application</li>
<li>Notice of Articles</li>
<li>Certificate of Continuation</li>
<li>Receipt</li>
</ul>
{% endif %}

[[whitespace-16px.html]]
[[business-dashboard-link.html]]
<p class="business-dashboard-link">
These documents are also available through your <a href="{{ entity_dashboard_url }}">My Business Registry</a>.
</p>

[[whitespace-16px.html]]
[[cra-notice.html]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,12 @@
<!-- first section -->
<p class="title-message bold">We have received your Continuation Application</p>

<p>BC Registries will review your Continuation Authorization documents and contact you
with the results within 2 business days.</p>

[[20px.html]]
[[divider.html]]
[[20px.html]]

<!-- second section -->
[[continuation-application-details.html]]
[[business-information.html]]

[[20px.html]]
[[divider.html]]
Expand All @@ -39,21 +36,25 @@

<p>The following documents are attached to this email:</p>
<ul class="outputs">
<li>Continuation Application - Pending</li>
<li>Continuation Application</li>
<li>Receipt</li>
</ul>

[[business-dashboard-link.html]]
<p class="business-dashboard-link">
These documents are also available through your <a href="{{ entity_dashboard_url }}">My Business Registry</a>.
</p>
[[8px.html]]

{% if header.isFutureEffective %}
<p>
Once your authorization has been approved, your business will be registered and you will
receive the following outputs:
On the effective date and time you specified, the business will be continued into B.C. and you will
receive the following documents by email:
</p>
<ul class="outputs">
<li>Notice of Articles</li>
<li>Certificate of Continuation</li>
</ul>
{% endif %}

<!-- fourth section -->
[[24px.html]]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="referrer" content="origin-when-cross-origin"/>
<meta name="author" content="BC Registries and Online Services">
<title>Results of your Continuation Application</title>
<title>Continuation Authorization Results from the Business Registry</title>
[[style.html]]
</head>

Expand All @@ -18,11 +18,9 @@

<div class="container">
<!-- first section -->
<p class="title-message bold">Results of your Continuation Application</p>
<p class="title-message bold">Results of your Continuation Authorization</p>

<p>Your Continuation Authorization is <span class="bold">rejected</span> and a refund request
has been submitted. The refund will be applied to your original payment method. Refunds
are usually processed within 10-14 business days.</p>
<p>Your Continuation Authorization was <span class="bold">rejected</span>.</p>

[[20px.html]]
[[divider.html]]
Expand All @@ -34,7 +32,7 @@
<ol class="outputs">
<li>Review the reasons for rejected as outlined below:</li>
<pre class="bold">{{ latest_review_comment }}</pre>
<li>Visit <a href="{{ entity_dashboard_url }}">BC Business Registry account</a> to submit
<li>Visit <a href="{{ entity_dashboard_url }}">My Business Registry</a> to submit
a new Continuation Application.</li>
</ol>

Expand All @@ -51,16 +49,6 @@
[[20px.html]]

<!-- fourth section -->
<p class="title-message bold">Attached to this Email</p>

<p>The following document is attached to this email:</p>
<ul class="outputs">
<li>Continuation Application - Rejected</li>
</ul>

[[business-dashboard-link.html]]

<!-- fifth section -->
[[24px.html]]
[[footer.html]]
</div>
Expand Down
Loading
Loading