Skip to content

Commit

Permalink
Merge branch 'master' into commercial-staging
Browse files Browse the repository at this point in the history
  • Loading branch information
neprune committed Sep 18, 2024
2 parents e052655 + 9e1050a commit e747b9d
Show file tree
Hide file tree
Showing 7 changed files with 35 additions and 7 deletions.
15 changes: 10 additions & 5 deletions perllib/FixMyStreet/Cobrand/Bexley/Waste.pm
Original file line number Diff line number Diff line change
Expand Up @@ -1092,18 +1092,23 @@ sub waste_munge_report_data {

my $c = $self->{c};

my $address = $c->stash->{property}->{address};
my $service = $c->stash->{services}{$id}{service_name};
my $property = $c->stash->{property};
my $address = $property->{address};
my $service_id = $c->stash->{services}{$id}{service_id};
my $service_name = $c->stash->{services}{$id}{service_name};
my $uprn = $c->stash->{services}{$id}{uprn};
$data->{title} = "Report missed $service";
my $containers = $self->_containers($property);
my $service_description = $containers->{$service_id}->{description};
$service_description = 'Various' if $service_description =~ /<li>/;
$data->{title} = "$service_name ($service_description)";
$data->{detail} = "$data->{title}\n\n$address";
$c->set_param('uprn', $uprn);
$c->set_param('service_id', $id);
$c->set_param('location_of_containers', $data->{extra_detail}) if $data->{extra_detail};
$c->set_param('service_item_name', $c->stash->{services}{$id}{service_id});
$c->set_param('service_item_name', $service_id);

# Check if this property has assisted collections
my $contracts = $self->whitespace->GetSiteContracts($c->stash->{property}{uprn});
my $contracts = $self->whitespace->GetSiteContracts($property->{uprn});
$c->set_param('assisted_yn', (grep { $_->{ContractID} == 7 } @$contracts) ? 'Yes' : 'No');
}

Expand Down
9 changes: 8 additions & 1 deletion t/app/controller/waste_bexley.t
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ use Test::MockTime 'set_fixed_time';
use Test::Output;
use FixMyStreet::TestMech;
use FixMyStreet::Script::Reports;
use FixMyStreet::Script::Alerts;

FixMyStreet::App->log->disable('info');
END { FixMyStreet::App->log->enable('info'); }
Expand Down Expand Up @@ -846,7 +847,13 @@ FixMyStreet::override_config {
'Submitting missed collection report'
);
$mech->content_contains('Missed collection has been reported');

FixMyStreet::Script::Reports::send();
my @emails = $mech->get_email;
my $email;
for my $mail (@emails) {
$email = $mail->as_string if $mail->header('To') =~ '[email protected]';
};
like $email, qr/Brown Caddy \(Food waste\)/, 'Service added to title';
my @reports = FixMyStreet::DB->resultset("Problem")->all;
is @reports, 1, 'only one report created';

Expand Down
2 changes: 1 addition & 1 deletion templates/email/bexley/waste/_sidebar_content.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
title = title.remove(address);
ELSIF is_missed_collection;
title = report.title;
title = title.remove('Report missed ');
title = title.remove('Report missed '); # For any older reports
END
%]
<h2 style="[% h2_style %]">Bins reported as missed:</h2>
Expand Down
3 changes: 3 additions & 0 deletions templates/web/base/report/form/photo_upload.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,10 @@
<label id="photo-upload-label" for="form_photo">
<span data-singular="[% loc('Photo') %]" data-plural="[% loc('Photos') %]">[% loc('Photo') %]</span>
[% IF c.cobrand.moniker == 'zurich' %][% loc('(Defect &amp; location of defect)') %][% END %]
[% IF c.cobrand.moniker == 'nottinghamshirepolice' %][%# Nothing ~%]
[% ELSE ~%]
<span class="js-hide-if-category-photo-required">[% loc('(optional)') %]</span>
[%~ END %]
</label>

[% IF field_errors.photo %]
Expand Down
3 changes: 3 additions & 0 deletions templates/web/base/waste/bin_days.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ <h1 class="govuk-heading-xl">Your bin days</h1>
<div class="waste__collections">
[% IF c.cobrand.moniker != 'peterborough' %]
<h2 class="govuk-heading-l govuk-!-margin-bottom-2">Your collections</h2>
[% IF c.cobrand.moniker == 'brent' && service_data.size %]
<p>Please note all collections can take place between 7am &ndash; 10pm.</p>
[% END %]
[% ELSE %]
<div class="govuk-!-margin-bottom-8">
<h2 class="govuk-heading-l govuk-!-margin-bottom-2">Your collections</h2>
Expand Down
2 changes: 2 additions & 0 deletions templates/web/nottinghamshirepolice/around/intro.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Report, view, or discuss local problems</h1>
<h2>(like graffiti, litter, overgrown areas, or low level gardening)</h2>
8 changes: 8 additions & 0 deletions templates/web/nottinghamshirepolice/index-steps.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<h2>[% loc('How to report a problem') %]</h2>

<ol class="big-numbers">
<li>[% question %]</li>
<li>Locate the problem on a map of the area</li>
<li>Enter details of the problem; please note that we require images to make our initial assessment, so if possible please attach these</li>
<li>We send it to the council on your behalf</li>
</ol>

0 comments on commit e747b9d

Please sign in to comment.