Skip to content

Commit

Permalink
[4.3] SSSU-73: date format and improve port's templates, store ported…
Browse files Browse the repository at this point in the history
… numbers in another field (2600hz#5405)

* SSSU-73: port comment date format, enhance layout

* SSSU-73: get commenter info

* SSSU-73: update port comment notification

* SSSU-73: fix date format, billing address, encoding. add/fix more fields

* SSSU-73: store ported numbers to another key

* SSSU-73: remove attachments from un-related ports, set proper from address for

admin port request report

* SSSU-73: conditionally show scheduled or requested port date

* SSSU-73: address pr comments
  • Loading branch information
icehess authored and k-anderson committed Jan 9, 2019
1 parent d222bf6 commit 2027d63
Show file tree
Hide file tree
Showing 30 changed files with 420 additions and 241 deletions.
30 changes: 15 additions & 15 deletions applications/teletype/priv/templates/port_cancel.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@ <h2 style="margin:0;padding:0;text-align:center;font-family:'Open Sans',sans-ser
</tr>
<tr>
<td bgcolor="#ffffff" style="text-align:center;padding:20px;font-family:'Open Sans',sans-serif;color:#555555;">
<p style="text-align:center;margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#555555;">Your port request <b>{{port_request.name}}</b> of account <b>{{account.name}}</b> has been canceled.</p>
<p style="text-align:center;margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#555555;">Your port request <b>{{port_request.name}}</b> in account <b>{{account.name}}</b> has been canceled.</p>
</td>
</tr>
</table>
{% if port_request.transition_reason.content %}
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="border-color:#dedede;border-width:1px;border-left-style:solid;border-right-style:solid;max-width:600px;">
<tr>
<td bgcolor="#ffffff" style="padding:20px">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#eaeaea" width="80%" style="background-color:#eaeaea;border-radius:5px;">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#f7c659" width="80%" style="background-color:#f7c659;border-radius:5px;">
<tr>
<td style="padding:.9em;font-size:.9em;font-family:'Open Sans',sans-serif;color:#555555;line-height:20px;border-radius:5px;">
<p style="margin:0;padding:0;font-size:.7em;font-family:'Open Sans',sans-serif;color:#555555;"><b>{{port_request.transition_reason.user.first_name}} {{port_request.transition_reason.user.last_name}}</b> commented on {{port_request.transition_reason.date.local|date:"l, F j, Y \\a\\t H:i"}}:</p>
<p style="margin:0;padding:0;font-size:.7em;font-family:'Open Sans',sans-serif;color:#555555;"><b>{{port_request.transition_reason.user.author}}</b> commented on {{port_request.transition_reason.date.local|date:"F j, Y \\a\\t h:i A"}}:</p>
<p style="margin:0;padding:0">{{port_request.transition_reason.content}}</p>
</td>
</tr>
Expand All @@ -56,22 +56,22 @@ <h2 style="margin:0;padding:0;text-align:center;font-family:'Open Sans',sans-ser
</table>
{% endif %}
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="border-color:#dedede;border-width:1px;border-left-style:solid;border-right-style:solid;max-width:600px;">
<!-- Clear Spacer -->
<tr><td height="50" style="background-color:#ffffff;font-size:50px;line-height:50px;">&nbsp;</td></tr>
<tr>
<td bgcolor="#ffffff" style="padding:20px;font-family:'Open Sans',sans-serif;color:#555555;font-weight:100;">
<h3 style="margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#555555;font-weight:100;">Port Request Numbers</h3>
<td bgcolor="#e2e2e2" style="padding:0 20px;background-color:#e2e2e2;color:#555555;border-bottom:2px solid #ffffff;">
<h4 style="font-weight:100;line-height:20px;margin:13px 0;font-family:'Open Sans',sans-serif;color:#555555;">Port Request Information</h4>
<p style="margin:13px;padding:0;font-family:'Open Sans',sans-serif;color:#555555;font-size:11px;line-height:18px;">
<b>-&nbsp;&nbsp;&nbsp;Name:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.name}}</span><br>
<b>-&nbsp;&nbsp;&nbsp;State:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.port_state}}</span><br>
<b>-&nbsp;&nbsp;&nbsp;ID:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.id}}</span><br>{% if port_request.port_scheduled_date %}
<b>-&nbsp;&nbsp;&nbsp;Scheduled Transfer Date:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.port_scheduled_date.local|date:"l, F j, Y h:i A"}} ({{port_request.port_scheduled_date.timezone}})</span><br>{% elif port_request.requested_port_date %}
<b>-&nbsp;&nbsp;&nbsp;Requested Transfer Date:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.requested_port_date.local|date:"l, F j, Y h:i A"}} ({{port_request.requested_port_date.timezone}})</span><br>{% endif %}
<b>-&nbsp;&nbsp;&nbsp;Numbers:</b><br><span style="font-family:monospace;">{{ port_request.numbers|join:", " }}</span>
</p>
</td>
</tr>
<tr>
<td bgcolor="#ffffff" style="padding:20px;">
<ul style="padding:0;margin:0 20px;">{% for number in port_request.numbers %}<li style="font-family:'Open Sans',sans-serif;color:#555555;line-height:20px;padding:5px 0;">{{number}}</li>{% endfor %}</ul>
</td>
</tr>
</table>
<!-- Pre-Footer -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="border-color:#dedede;border-width:1px;border-left-style:solid;border-right-style:solid;max-width:600px;">
<!-- Clear Spacer -->
<tr><td height="50" style="background-color:#ffffff;font-size:50px;line-height:50px;">&nbsp;</td></tr>
<tr><!-- #6a59f7 -->
<td bgcolor="#e2e2e2" style="padding:0 20px;background-color:#e2e2e2;color:#555555;">
<h4 style="font-weight:100;line-height:20px;margin:13px 0;font-family:'Open Sans',sans-serif;color:#555555;">Account Information</h4>
<p style="margin:13px;padding:0;font-family:'Open Sans',sans-serif;color:#555555;font-size:11px;line-height:18px;">
Expand Down
19 changes: 11 additions & 8 deletions applications/teletype/priv/templates/port_cancel.text
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
Port Request Canceled

Your port request "{{port_request.name}}" of account '{{account.name}}' has been canceled.
{% if port_request.transition_reason.content %}
Your port request {{port_request.name}} in account {{account.name}} has been canceled.{% if port_request.transition_reason.content %}

{{port_request.transition_reason.user.first_name}} {{port_request.transition_reason.user.last_name}} commented on {{port_request.transition_reason.date.local|date:"l, F j, Y \\a\\t H:i"}}:
{{port_request.transition_reason.content}}
{{port_request.transition_reason.user.author}} commented on {{port_request.transition_reason.date.local|date:"F j, Y \\a\\t h:i A"}}:
> {{port_request.transition_reason.content}}
{% endif %}

=== Port Request Numbers ===

{% for number in port_request.numbers %}
- {{number}}
{% endfor %}

Port Request Information
Name: {{port_request.name}}
State: {{port_request.port_state}}
ID: {{port_request.id}}{% if port_request.port_scheduled_date %}
Scheduled Date: {{port_request.port_scheduled_date.local|date:"l, F j, Y h:i A"}} ({{port_request.port_scheduled_date.timezone}}){% elif port_request.requested_port_date %}
Requested Transfer Date: {{port_request.requested_port_date.local|date:"l, F j, Y h:i A"}} ({{port_request.requested_port_date.timezone}}){% endif %}
Numbers: {{ port_request.numbers|join:", "|stringformat:"s"|wordwrap:40 }}



Expand Down
37 changes: 30 additions & 7 deletions applications/teletype/priv/templates/port_comment.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<body width="100%" bgcolor="#eaeaea" style="margin:0;mso-line-height-rule:exactly;background-color:#eaeaea">
<center style="padding:40px 0;width:100%;background:#eaeaea;text-align:left;">
<div style="display:none;font-size:1px;line-height:1px;max-height:0px;max-width:0px;opacity:0;overflow:hidden;mso-hide:all;font-family:sans-serif;">
{{user.first_name}} {{user.last_name}} commented on your port request '{{port_request.name}}' -
{{port_request.author}} commented on your port request '{{port_request.name}}' -
</div>
<div style="max-width:600px; margin:auto;" class="email-container">
<!--[if mso]>
Expand All @@ -37,25 +37,48 @@ <h2 style="margin:0;padding:0;text-align:center;font-family:'Open Sans',sans-ser
</tr>
<tr>
<td bgcolor="#ffffff" style="text-align:left;padding:20px;font-family:'Open Sans',sans-serif;color:#555555;">
<p style="text-align:left;margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#555555;">Comment on your port request <b>{{port_request.name}}</b> of account <b>{{account.name}}</b>:</p>
<p style="text-align:left;margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#555555;"><b>{{port_request.author}}</b> commented on your port request.</p>
</td>
</tr>
<tr>
<td bgcolor="#ffffff" style="padding:0 20px 20px;">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#eaeaea" width="80%" style="background-color:#eaeaea;border-radius:5px;">
<td bgcolor="#ffffff" style="padding:20px;">
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="80%" style="border-left:#eaeaea solid 3px;">
<tr>
<td style="padding:.9em;font-size:.9em;font-family:'Open Sans',sans-serif;color:#555555;line-height:20px;border-radius:5px;">
<p style="margin:0;padding:0;font-size:.7em;font-family:'Open Sans',sans-serif;color:#555555;"><b>{{user.first_name}} {{user.last_name}}</b> commented on {{port_request.comment.date.local|date:"l, F j, Y \\a\\t H:i"}}:</p>
<p style="margin:0;padding:0">{{port_request.comment.content}}</p>
<td style="padding:.9em;font-size:.8em;font-family:'Open Sans',sans-serif;color:#555555;line-height:20px;">
<i>{{port_request.comment.date.local|date:"F j, Y h:i A"}}</i>
</td>
</tr>
<tr>
<td style="padding:.9em;font-size:.9em;font-family:'Open Sans',sans-serif;color:#555555;line-height:20px;">{{port_request.comment.content}}</td>
</tr>
</table>
</td>
</tr>
<!-- Clear Spacer -->
<tr><td height="50" style="background-color:#ffffff;font-size:50px;line-height:50px;">&nbsp;</td></tr>
<tr>
<td bgcolor="#e2e2e2" style="padding:0 20px;background-color:#e2e2e2;color:#555555;border-bottom:2px solid #ffffff;">
<h4 style="font-weight:100;line-height:20px;margin:13px 0;font-family:'Open Sans',sans-serif;color:#555555;">Port Request Information</h4>
<p style="margin:13px;padding:0;font-family:'Open Sans',sans-serif;color:#555555;font-size:11px;line-height:18px;">
<b>-&nbsp;&nbsp;&nbsp;Name:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.name}}</span><br>
<b>-&nbsp;&nbsp;&nbsp;State:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.port_state}}</span><br>
<b>-&nbsp;&nbsp;&nbsp;ID:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.id}}</span>
</p>
</td>
</tr>
<tr>
<td bgcolor="#e2e2e2" style="padding:0 20px;background-color:#e2e2e2;color:#555555;">
<h4 style="font-weight:100;line-height:20px;margin:13px 0;font-family:'Open Sans',sans-serif;color:#555555;">Account Information</h4>
<p style="margin:13px;padding:0;font-family:'Open Sans',sans-serif;color:#555555;font-size:11px;line-height:18px;">
<b>-&nbsp;&nbsp;&nbsp;Account ID:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{account.id}}</span><br>
<b>-&nbsp;&nbsp;&nbsp;Account Name:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{account.name}}</span><br>
<b>-&nbsp;&nbsp;&nbsp;Account Realm:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{account.realm}}</span>
</p>
</td>
</tr>
</table>
<!-- Email Footer -->
<!-- Email Footer -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" bgcolor="#202029" align="center" width="100%" style="background-color:#202029;border-color:#202029;border-width:1px;border-left-style:solid;border-right-style:solid;max-width:600px;">
<tr><td style="font-size:50px;line-height:50px;" height="50">&nbsp;</td></tr>
</table>
Expand Down
14 changes: 11 additions & 3 deletions applications/teletype/priv/templates/port_comment.text
Original file line number Diff line number Diff line change
@@ -1,9 +1,17 @@
Port Request Comment

Comment on your port request "{{port_request.name}}" of account '{{account.name}}'.
{{port_request.author}} commented on your port request.

{{user.first_name}} {{user.last_name}} commented on {{port_request.comment.date.local|date:"l, F j, Y \\a\\t H:i"}}:
{{port_request.comment.content}}
{{port_request.comment.date.local|date:"F j, Y H:i A"}}


> {{port_request.comment.content}}


Port Request Information
Name: {{port_request.name}}
State: {{port_request.port_state}}
ID: {{port_request.id}}


Account Information
Expand Down
30 changes: 15 additions & 15 deletions applications/teletype/priv/templates/port_pending.html
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ <h2 style="margin:0;padding:0;text-align:center;font-family:'Open Sans',sans-ser
</tr>
<tr>
<td bgcolor="#ffffff" style="text-align:center;padding:20px;font-family:'Open Sans',sans-serif;color:#555555;">
<p style="text-align:center;margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#555555;">Your request <b>{{port_request.name}}</b> to port numbers into account <b>{{account.name}}</b> is transitioned into pending state.</p>
<p style="text-align:center;margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#555555;">Your number port request <b>{{port_request.name}}</b> for account <b>{{account.name}}</b> transitioned into pending state.</p>
</td>
</tr>
</table>
Expand All @@ -49,7 +49,7 @@ <h2 style="margin:0;padding:0;text-align:center;font-family:'Open Sans',sans-ser
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" bgcolor="#eaeaea" width="80%" style="background-color:#eaeaea;border-radius:5px;">
<tr>
<td style="padding:.9em;font-size:.9em;font-family:'Open Sans',sans-serif;color:#555555;line-height:20px;border-radius:5px;">
<p style="margin:0;padding:0;font-size:.7em;font-family:'Open Sans',sans-serif;color:#555555;"><b>{{port_request.transition_reason.user.first_name}} {{port_request.transition_reason.user.last_name}}</b> commented on {{port_request.transition_reason.date.local|date:"l, F j, Y \\a\\t H:i"}}:</p>
<p style="margin:0;padding:0;font-size:.7em;font-family:'Open Sans',sans-serif;color:#555555;"><b>{{port_request.transition_reason.user.author}}</b> commented on {{port_request.transition_reason.date.local|date:"F j, Y \\a\\t h:i A"}}:</p>
<p style="margin:0;padding:0">{{port_request.transition_reason.content}}</p>
</td>
</tr>
Expand All @@ -58,24 +58,24 @@ <h2 style="margin:0;padding:0;text-align:center;font-family:'Open Sans',sans-ser
</tr>
</table>
{% endif %}
<!-- Pre-Footer -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="border-color:#dedede;border-width:1px;border-left-style:solid;border-right-style:solid;max-width:600px;">
<!-- Clear Spacer -->
<tr><td height="50" style="background-color:#ffffff;font-size:50px;line-height:50px;">&nbsp;</td></tr>
<tr>
<td bgcolor="#ffffff" style="padding:20px;font-family:'Open Sans',sans-serif;color:#555555;font-weight:100;">
<h3 style="margin:0;padding:0;font-family:'Open Sans',sans-serif;color:#555555;font-weight:100;">Port Request Numbers</h3>
<td bgcolor="#e2e2e2" style="padding:0 20px;background-color:#e2e2e2;color:#555555;border-bottom:2px solid #ffffff;">
<h4 style="font-weight:100;line-height:20px;margin:13px 0;font-family:'Open Sans',sans-serif;color:#555555;">Port Request Information</h4>
<p style="margin:13px;padding:0;font-family:'Open Sans',sans-serif;color:#555555;font-size:11px;line-height:18px;">
<b>-&nbsp;&nbsp;&nbsp;Name:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.name}}</span><br>
<b>-&nbsp;&nbsp;&nbsp;State:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.port_state}}</span><br>
<b>-&nbsp;&nbsp;&nbsp;ID:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.id}}</span><br>{% if port_request.port_scheduled_date %}
<b>-&nbsp;&nbsp;&nbsp;Scheduled Transfer Date:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.port_scheduled_date.local|date:"l, F j, Y h:i A"}} ({{port_request.port_scheduled_date.timezone}})</span><br>{% elif port_request.requested_port_date %}
<b>-&nbsp;&nbsp;&nbsp;Requested Transfer Date:</b>&nbsp;&nbsp;<span style="font-family:monospace;">{{port_request.requested_port_date.local|date:"l, F j, Y h:i A"}} ({{port_request.requested_port_date.timezone}})</span><br>{% endif %}
<b>-&nbsp;&nbsp;&nbsp;Numbers:</b><br><span style="font-family:monospace;">{{ port_request.numbers|join:", " }}</span>
</p>
</td>
</tr>
<tr>
<td bgcolor="#ffffff" style="padding:20px;">
<ul style="padding:0;margin:0 20px;">{% for number in port_request.numbers %}<li style="font-family:'Open Sans',sans-serif;color:#555555;line-height:20px;padding:5px 0;">{{number}}</li>{% endfor %}</ul>
</td>
</tr>

</table>
<!-- Pre-Footer -->
<table role="presentation" cellspacing="0" cellpadding="0" border="0" align="center" width="100%" style="border-color:#dedede;border-width:1px;border-left-style:solid;border-right-style:solid;max-width:600px;">
<!-- Clear Spacer -->
<tr><td height="50" style="background-color:#ffffff;font-size:50px;line-height:50px;">&nbsp;</td></tr>
<tr><!-- #6a59f7 -->
<td bgcolor="#e2e2e2" style="padding:0 20px;background-color:#e2e2e2;color:#555555;">
<h4 style="font-weight:100;line-height:20px;margin:13px 0;font-family:'Open Sans',sans-serif;color:#555555;">Account Information</h4>
<p style="margin:13px;padding:0;font-family:'Open Sans',sans-serif;color:#555555;font-size:11px;line-height:18px;">
Expand Down
Loading

0 comments on commit 2027d63

Please sign in to comment.