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

Update information-for-councils.html #4936

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 11 additions & 3 deletions perllib/FixMyStreet/Cobrand/Bexley/Waste.pm
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,11 @@ sub bin_services_for_address {
if ( my $id = $frequency_types{fortnightly} ) {
$id = 'Wk-' . $id;
my $links = $self->{c}->cobrand->feature('waste_calendar_links');
$self->{c}->stash->{calendar_link} = $links->{$id};
$self->{c}->stash->{calendar_link} = [
{ href => $links->{$id},
text => 'View and download collection calendar',
}
];
}

@site_services_filtered = $self->_remove_service_if_assisted_exists(@site_services_filtered);
Expand Down Expand Up @@ -546,7 +550,7 @@ sub image_for_unit {
return '/i/waste-containers/bexley/' . $images->{$service_id};
}

sub bin_day_format { '%A, %-d~~~ %B %Y' }
sub bin_day_format { '%A %-d %B %Y' }

# TODO This logic is copypasted across multiple files; get it into one place
my %irregulars = ( 1 => 'st', 2 => 'nd', 3 => 'rd', 11 => 'th', 12 => 'th', 13 => 'th');
Expand All @@ -571,6 +575,10 @@ For:
HTML

return {
'CW-SACK' => {
name => 'Clinical Waste Sack(s)',
description => 'Clinical waste',
},
'FO-140' => {
name => 'Communal Food Bin',
description => 'Food waste',
Expand Down Expand Up @@ -750,7 +758,7 @@ HTML
description => 'Non-recyclable waste',
},
'RES-SACK' => {
name => 'Rubbish collection',
name => 'Black Sack(s)',
description => 'Non-recyclable waste',
},
};
Expand Down
2 changes: 1 addition & 1 deletion perllib/FixMyStreet/Script/Alerts.pm
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ sub _send_aggregated_alert(%) {
if (@template_data) {
my %template_data = %data;
$template_data{data} = [@template_data];
$template_data{template} = 'templated_email_alert-update';
$template_data{private_email} = 1;
trigger_alert_sending($alert_by, $token, %template_data);
};

Expand Down
43 changes: 18 additions & 25 deletions t/app/controller/waste_bexley.t
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,9 @@ FixMyStreet::override_config {
%defaults,
},
{ id => 6,
service_id => 'MDR-SACK',
service_name => 'Clear Sack(s)',
service_description => 'For:
<ul>
<li>paper and cardboard</li>
<li>plastic bottles</li>
<li>glass bottles and jars</li>
<li>food and drinks cans</li>
</ul>
',
service_id => 'RES-CHAM',
service_name => 'Communal Refuse Bin(s)',
service_description => 'Non-recyclable waste',
round_schedule => 'RND-6 Wed Wk 2',
round => 'RND-6',
report_allowed => 1,
Expand Down Expand Up @@ -346,17 +339,17 @@ FixMyStreet::override_config {
my $mech = shift;

$mech->content_contains('Communal Food Bin');
$mech->content_contains('Tuesday, 30th April 2024');
$mech->content_contains('Tuesday 30 April 2024');
$mech->content_lacks('Brown Caddy');
$mech->content_lacks('Green Recycling Bin');
$mech->content_lacks('Black Recycling Box');
$mech->content_contains('Clear Sack(s)');
$mech->content_contains('Wednesday, 1st May 2024');
$mech->content_contains('Communal Refuse Bin(s)');
$mech->content_contains('Wednesday 1 May 2024');
$mech->content_lacks('Blue Lidded Wheelie Bin');
$mech->content_contains('Blue Recycling Box');
$mech->content_contains('Monday, 1st April 2024');
$mech->content_contains('Monday 1 April 2024');
$mech->content_contains('Green Recycling Box');
$mech->content_contains('Monday, 1st April 2024');
$mech->content_contains('Monday 1 April 2024');
}

subtest 'Checking calendar' => sub {
Expand All @@ -374,7 +367,7 @@ FixMyStreet::override_config {
$i++ if /DTSTART;VALUE=DATE:20240401/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240401/ && /SUMMARY:Green Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240402/ && /SUMMARY:Communal Food Bin/;
$i++ if /DTSTART;VALUE=DATE:20240403/ && /SUMMARY:Clear Sack\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240403/ && /SUMMARY:Communal Refuse Bin\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240403/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240403/ && /SUMMARY:Green Recycling Box/;

Expand All @@ -386,16 +379,16 @@ FixMyStreet::override_config {
$i++ if /DTSTART;VALUE=DATE:20240415/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240415/ && /SUMMARY:Green Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240416/ && /SUMMARY:Communal Food Bin/;
$i++ if /DTSTART;VALUE=DATE:20240417/ && /SUMMARY:Clear Sack\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240417/ && /SUMMARY:Communal Refuse Bin\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240417/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240417/ && /SUMMARY:Green Recycling Box/;

$i++ if /DTSTART;VALUE=DATE:20240501/ && /SUMMARY:Clear Sack\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240501/ && /SUMMARY:Communal Refuse Bin\(s\)/;

$i++ if /DTSTART;VALUE=DATE:20240506/ && /SUMMARY:Blue Recycling Box/;
$i++ if /DTSTART;VALUE=DATE:20240506/ && /SUMMARY:Green Recycling Box/;

$i++ if /DTSTART;VALUE=DATE:20240515/ && /SUMMARY:Clear Sack\(s\)/;
$i++ if /DTSTART;VALUE=DATE:20240515/ && /SUMMARY:Communal Refuse Bin\(s\)/;
}
is $i, $expected_num, 'Correct events in the calendar';
};
Expand All @@ -409,7 +402,7 @@ FixMyStreet::override_config {
"Your rotation schedule is Week $test->{link}",
'Correct rotation schedule displayed',
);
$mech->content_contains('<li><a target="_blank" href="PDF '. $test->{link} . '">Download PDF waste calendar', 'PDF link ' . $test->{link} . ' shown');
$mech->content_contains('<li><a target="_blank" href="PDF '. $test->{link} . '">View and download collection calendar', 'PDF link ' . $test->{link} . ' shown');
}
};

Expand Down Expand Up @@ -440,7 +433,7 @@ FixMyStreet::override_config {
subtest 'Making a missed collection report' => sub {
$mech->get_ok('/waste/10001/report');
$mech->submit_form_ok(
{ with_fields => { extra_detail => 'Front boundary of property', 'service-MDR-SACK' => 1 } },
{ with_fields => { extra_detail => 'Front boundary of property', 'service-RES-CHAM' => 1 } },
'Selecting missed collection for clear sacks');
$mech->submit_form_ok(
{ with_fields => { name => 'John Doe', phone => '44 07 111 111 111', email => 'test@example.com' } },
Expand All @@ -456,16 +449,16 @@ FixMyStreet::override_config {
ok $report->confirmed;
is $report->state, 'confirmed';
is $report->get_extra_field_value('uprn'), '10001', 'UPRN is correct';
is $report->get_extra_field_value('service_item_name'), 'MDR-SACK', 'Service item name is correct';
is $report->get_extra_field_value('service_item_name'), 'RES-CHAM', 'Service item name is correct';
is $report->get_extra_field_value('assisted_yn'), 'No', 'Assisted collection is correct';
is $report->get_extra_field_value('location_of_containers'), 'Front boundary of property', 'Location of containers is correct';
};

subtest 'Missed collection reports are made against the parent property' => sub {
$mech->get_ok('/waste/10002/report');
$mech->submit_form_ok(
{ with_fields => { extra_detail => 'Rear of property', 'service-MDR-SACK' => 1 } },
'Selecting missed collection for blue recycling box');
{ with_fields => { extra_detail => 'Rear of property', 'service-RES-CHAM' => 1 } },
'Selecting missed collection for communal refuse bin');
$mech->submit_form_ok(
{ with_fields => { name => 'John Doe', phone => '44 07 111 111 111', email => 'test@example.com' } },
'Submitting contact details');
Expand Down Expand Up @@ -610,7 +603,7 @@ sub _site_collections {
},
{ SiteServiceID => 6,
ServiceItemDescription => 'Service 6',
ServiceItemName => 'MDR-SACK', # Clear Sack(s)
ServiceItemName => 'RES-CHAM', # Residual Chamberlain

NextCollectionDate => '2024-05-01T00:00:00',
SiteServiceValidFrom => '2024-03-31T00:59:59',
Expand Down
4 changes: 3 additions & 1 deletion templates/email/default/_email_comment_list.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
[% IF report.category == 'Bulky collection' AND (row.item_problem_state == 'closed' OR row.item_problem_state == 'fixed - council' OR row.item_problem_state == 'unable to fix') %]
[% INCLUDE 'waste/_bulky_email_comment_end.html' %]
[% ELSE %]
[% email_sanitize_html(update) | replace('<p>', '<p style="' _ list_item_p_style _ '">') %]
[% email_sanitize_html(update, private_email ? "item_private_email_text" : undef) | replace('<p>', '<p style="' _ list_item_p_style _ '">') %]
[% IF NOT private_email %]
<p class="user-name" style="[% list_item_date_style %]">
[%~ IF update.item_anonymous %]
[%~ loc('Posted anonymously') -%]
Expand All @@ -17,6 +18,7 @@
[%~ END %]
[% '(' _ cobrand.prettify_dt(update.confirmed) _ ') ' IF cobrand.include_time_in_update_alerts -%]
</p>
[% END %]
[% END %]
</div>
[% END %]
4 changes: 3 additions & 1 deletion templates/email/default/_email_comment_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@
[% IF report.category == 'Bulky collection' AND (row.item_problem_state == 'closed' OR row.item_problem_state == 'fixed - council' OR row.item_problem_state == 'unable to fix') -%]
[% INCLUDE 'waste/_bulky_email_comment_end.txt' -%]
[% ELSE -%]
[% IF NOT private_email -%]
[% row.item_name _ ' : ' IF row.item_name AND NOT row.item_anonymous -%]
[% END -%]
[% '(' _ cobrand.prettify_dt(row.confirmed) _ ') ' IF cobrand.include_time_in_update_alerts -%]
[% email_sanitize_text(row) -%]
[% email_sanitize_text(row, private_email ? "item_private_email_text" : undef) -%]
[% END %]

------
Expand Down
31 changes: 0 additions & 31 deletions templates/email/default/templated_email_alert-update.html

This file was deleted.

29 changes: 0 additions & 29 deletions templates/email/default/templated_email_alert-update.txt

This file was deleted.

14 changes: 14 additions & 0 deletions templates/email/default/waste/other-reported.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,15 @@

<th style="[% td_style %][% primary_column_style %]" id="primary_column">
[% start_padded_box | safe %]
[% IF report.category == 'Request new container' %]
<h1 style="[% h1_style %]">Your request has been&nbsp;logged</h1>
[% ELSE %]
<h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
[% END %]

[% IF cobrand.moniker == 'sutton' %]
<p style="[% p_style %]">Thank you for contacting the London Borough of Sutton.</p>
[% END %]

[% INCLUDE '_council_reference.html' problem=report %]

Expand All @@ -24,6 +32,12 @@ <h1 style="[% h1_style %]">Your report has been&nbsp;logged</h1>
[% cobrand.wasteworks_config.request_timeframe %]
for this order to be processed. We thank you for your patience and
understanding in advance.</p>
<p style="[% p_style %]">If you have requested a bin, box or caddy to be collected as part of the request:</p>
<ul>
<li>Please keep any bin, box or caddy accessible in your front garden or driveway, ready to be exchanged.</li>
<li>It must be visible from the public highway, so delivery drivers can see it.</li>
<li>We will not be able to exchange a bin, box or caddy if the old bin is not available, and you may not receive your replacement.</li>
</ul>
[% END %]
[% ELSE %]

Expand Down
12 changes: 10 additions & 2 deletions templates/email/default/waste/other-reported.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,20 @@ Your report to [% report.body %] has been logged.

[% ELSIF cobrand.moniker == 'sutton' %]

[% IF report.category == 'Request new container' %]
[% IF report.category == 'Request new container' %]
Due to the current high demand, please allow up to
[% cobrand.wasteworks_config.request_timeframe %] for this
order to be processed. We thank you for your patience and understanding in
advance.
[% END %]

If you have requested a bin, box or caddy to be collected as part of the request:

* Please keep any bin, box or caddy accessible in your front garden or driveway, ready to be exchanged.

* It must be visible from the public highway, so delivery drivers can see it.

* We will not be able to exchange a bin, box or caddy if the old bin is not available, and you may not receive your replacement.
[% END %]

[% ELSE %]

Expand Down
2 changes: 1 addition & 1 deletion templates/email/kingston/alert-update.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Subject: New [% site_name %] updates on report, reference RBK-[% report.id %]
Subject: Update on report, reference RBK-[% report.id %]

The following updates have been left on this report:

Expand Down
2 changes: 1 addition & 1 deletion templates/email/sutton/alert-update.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Subject: New [% site_name %] updates on report, reference LBS-[% report.id %]
Subject: Update on report, reference LBS-[% report.id %]

The following updates have been left on this report:

Expand Down
2 changes: 2 additions & 0 deletions templates/web/base/report/_council_sent_info.html
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@
[%- ELSE %]
[%- tprintf(loc('FixMyStreet ref:&nbsp;%s'), problem.id) %].
[%- END -%]
[%- ELSIF problem.cobrand_data == 'waste' %]
[%- tprintf('WasteWorks ref:&nbsp;%s', problem.id) %].
[%- ELSE %]
[%- tprintf(loc('FixMyStreet ref:&nbsp;%s'), problem.id) %].
[%- END %]
Expand Down
9 changes: 9 additions & 0 deletions templates/web/base/waste/summary_report.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,25 @@
%]

[% BLOCK answers %]
[% SET first_service = 1 %]
[% FOR service IN data.keys.grep('^service-') %]
[% NEXT UNLESS data.$service %]
[% SET service_id = service.replace('service-', '') %]
<div class="govuk-summary-list__row">
[% IF cobrand.moniker == 'bexley' %]
<dt class="govuk-summary-list__key govuk-summary-list__key--sub">[% IF first_service; 'Bins missed'; END %]</dt>
<dd class="govuk-summary-list__value">
[% services.$service_id.service_name %]
</dd>
[% first_service = 0 %]
[% ELSE %]
<dt class="govuk-summary-list__key govuk-summary-list__key--sub">[% services.$service_id.service_name %]</dt>
<dd class="govuk-summary-list__value">
[%~ IF services.$service_id.last.date %]
[%~ date.format(services.$service_id.last.date) | replace('~~~', services.$service_id.last.ordinal) %]
[%~ END ~%]
</dd>
[% END %]
</div>
[% END %]
[% END %]
Expand Down
17 changes: 15 additions & 2 deletions templates/web/bexley/waste/services_extra.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
<div class="govuk-grid-row" id="in-cab-logs">
[% SET browna = "GA-140"; SET brownb = "GA-240" %]
[% UNLESS property.parent_property OR services.$browna OR services.$brownb %]
[% # Don't display garden waste promo if address has any of the below services %]
[%
SET has_blocked_service = 0;
FOR srv IN [
'GA-140',
'GA-240',
'MDR-SACK',
'RES-SACK',
];
IF services.$srv;
has_blocked_service = 1;
END;
END;
%]
[% UNLESS property.parent_property OR has_blocked_service %]
<h3 class="govuk-heading-m waste-service-name">
Brown Wheelie Bin
</h3>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ <h1>Information for councils</h1>
<dd>
<p>FixMyStreet can be connected with your existing system(s) in a number of ways:
<ol>
<li>You can do this yourself (for free) using our Open311 API</li>
<li>We can build and maintain the integration for you (carries an annual fee)</li>
<li>You can do this yourself (for free) using our <a href="/about/open311-api-info">Open311 API</a>.</li>
<li>We can build and maintain the integration for you (carries an annual fee).</li>
<li>You can become a <a href="https://www.societyworks.org/services/highways/">FixMyStreet Pro</a> user. FixMyStreet Pro is a more advanced version of FixMyStreet, which seeks to eliminate the significant costs councils incur from duplicate reporting, unnecessary contact and failure demand (we have the stats to prove it!). </li>
</ol>
<p>As a charitable organisation our goal is to help improve services for citizens and local authorities. If you would like some help connecting FixMyStreet to your own system(s), please send an email to <a href="mailto:support@fixmystreet.com">support@fixmystreet.com</a>.
<p>As a charity, our goal is to help improve services for citizens and local authorities. If you would like some help connecting FixMyStreet to your own system(s), please send an email to <a href="mailto:support@fixmystreet.com">support@fixmystreet.com</a>.
</dd>

</dl>
Expand Down