Skip to content

Commit

Permalink
Merge branch 'bexley-ww-communal-fixups' into bexley-ww-container-req…
Browse files Browse the repository at this point in the history
…uests
  • Loading branch information
dracos committed Nov 19, 2024
2 parents 5bb8860 + 59c463f commit 20718f2
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 22 deletions.
2 changes: 1 addition & 1 deletion t/app/controller/waste_bexley.t
Original file line number Diff line number Diff line change
Expand Up @@ -1260,7 +1260,7 @@ FixMyStreet::override_config {
$email_submit = $mech->get_html_body_from_email($email_submit);
$email_logged = $mech->get_text_body_from_email($email_logged);
like $email_logged, qr{Containers requested: $joined};
like $email_submit, qr{Containers requested:</h2>\s*<p[^>]*>\s*$joined};
like $email_submit, qr{<td>New/replacement container</td> <td>$joined};
like $email_submit, qr{<td>UPRN</td> <td>$_->{id}</td>}
};
}
Expand Down
35 changes: 35 additions & 0 deletions templates/email/bexley/waste/_submit_request_enquiry.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>WW - Replacement container enquiry</title>
<meta name="color-scheme" content="only">
<meta name="supported-color-schemes" content="only">
</head>
<body>
<h1>London Borough of Bexley (Wasteworks) - New [% report.category %]</h1>
<h2>(for back office only)</h2>
<p>The below details have been submitted via WasteWorks because it is a communal property or no service was found at the property.</p>

<table class="ww-flow-table" style="width:100%;" border="1">
<tr> <th>Details</th> <th>Data</th> </tr>
<tr> <td>Enquiry reference number</td> <td>[% report.id %]</td> </tr>
<tr> <td>Address</td> <td>[% report.get_extra_metadata.property_address %]</td> </tr>
<tr> <td>UPRN</td> <td>[% report.get_extra_field_value('uprn') %]</td> </tr>
<tr> <td>Time Received</td> <td>[% USE date; date.format(report.confirmed.epoch, '%Y-%m-%dT%H:%M:%SZ', gmt=1) %]</td> </tr>
<tr> <td>New/replacement container</td> <td>[% report.get_extra_field_value('Container').join('; ') %]</td> </tr>
<tr> <td>Full name</td> <td>[% report.name %]</td> </tr>
<tr> <td>Telephone</td> <td>[% report.user.phone %]</td> </tr>
<tr> <td>Email address</td> <td>[% report.user.email %]</td> </tr>
<tr> <td>Complaint Type</td> <td>[% report.get_extra_field_value('complaint_type') %]</td> </tr>
<!--Ignore static values below-->
<tr> <td>How Complaint Received</td> <td>WasteWorksOnline</td> </tr>
<tr> <td>Reference Type</td> <td>FIRM</td> </tr>
<tr> <td>Customer Type Code</td> <td>PUBLIC</td> </tr>
<tr> <td>Allocated To</td> <td>WTCALL</td> </tr>
<tr> <td>Received By</td> <td>WTCALL</td> </tr>
<tr> <td>Area Team</td> <td>WRTEAM</td> </tr>
</table>

</body>
</html>
28 changes: 7 additions & 21 deletions templates/email/bexley/waste/submit.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,13 @@
email_columns = 2;

PROCESS 'waste/_email_data.html';

# Special case for programmatic email
IF is_request_enquiry;
PROCESS 'waste/_submit_request_enquiry.html';
RETURN;
END;

PROCESS '_email_settings.html';
INCLUDE '_email_top.html';

Expand All @@ -21,30 +28,10 @@ <h2 style="[% h2_style %] margin: 30px 0 10px 0">(for back office only)</h2>

[% IF is_no_collections_missed_enquiry %]
<p>The below details have been submitted via WasteWorks for your attention because no collections were found at the property.</p>
[% ELSIF is_request_enquiry %]
<p>The below details have been submitted via WasteWorks because it is a communal property or no service was found at the property.</p>
[% END %]

<h2 style="[% h2_style %] margin: 30px 0 10px 0">Submission details:</h2>
<table [% table_reset | safe %]>
[% IF is_request_enquiry %]
<tr> <th>Details</th> <th>Data</th> </tr>
<tr> <td>Enquiry reference number</td> <td>[% report.id %]</td> </tr>
<tr> <td>Address</td> <td>[% report.get_extra_metadata.property_address %]</td> </tr>
<tr> <td>UPRN</td> <td>[% report.get_extra_field_value('uprn') %]</td> </tr>
<tr> <td>Time Received</td> <td>[% USE date; date.format(report.confirmed.epoch, '%Y-%m-%dT%H:%M:%SZ', gmt=1) %]</td> </tr>
<tr> <td>New/replacement container</td> <td>[% report.get_extra_field_value('Container').join('; ') %]</td> </tr>
<tr> <td>Full name</td> <td>[% report.name %]</td> </tr>
<tr> <td>Telephone</td> <td>[% report.user.phone %]</td> </tr>
<tr> <td>Email address</td> <td>[% report.user.email %]</td> </tr>
<tr> <td>Complaint Type</td> <td>[% report.get_extra_field_value('complaint_type') %]</td> </tr>
<tr> <td>How Complaint Received</td> <td>WasteWorksOnline</td> </tr>
<tr> <td>Reference Type</td> <td>WasteWorks</td> </tr>
<tr> <td>Customer Type Code</td> <td>PUBLIC</td> </tr>
<tr> <td>Allocated To</td> <td>WTCALL</td> </tr>
<tr> <td>Received By</td> <td>WTCALL</td> </tr>
<tr> <td>Area Team</td> <td>WRTEAM</td> </tr>
[% ELSE %]
[% IF is_no_collections_missed_enquiry %]
<tr>
<th style="[% contact_th_style %]">Trying to report missed collection<br>for business or organisation?</th>
Expand All @@ -71,7 +58,6 @@ <h2 style="[% h2_style %] margin: 30px 0 10px 0">Submission details:</h2>
<td style="[% contact_td_style %]"><a href="tel:[% report.user.phone | html %]">[% report.user.phone | html %]</a></td>
</tr>
[%~ END %]
[% END %]
</table>

[% end_padded_box | safe %]
Expand Down

0 comments on commit 20718f2

Please sign in to comment.