aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/App/Controller/Admin/Reports.pm1
-rw-r--r--perllib/FixMyStreet/Cobrand/TfL.pm10
2 files changed, 10 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Admin/Reports.pm b/perllib/FixMyStreet/App/Controller/Admin/Reports.pm
index c57b207e2..ef9736ff6 100644
--- a/perllib/FixMyStreet/App/Controller/Admin/Reports.pm
+++ b/perllib/FixMyStreet/App/Controller/Admin/Reports.pm
@@ -485,6 +485,7 @@ sub categories_for_point : Private {
my $prefetched_all_areas = [ grep { $_ } split ',', $c->stash->{report}->areas ];
$c->forward('/around/check_location_is_acceptable', [ $prefetched_all_areas ]);
# As with a new report, fetch the bodies/categories
+ $c->stash->{categories_for_point} = 1;
$c->forward('/report/new/setup_categories_and_bodies');
# Remove the "Pick a category" option
diff --git a/perllib/FixMyStreet/Cobrand/TfL.pm b/perllib/FixMyStreet/Cobrand/TfL.pm
index 797b872a4..e32711a02 100644
--- a/perllib/FixMyStreet/Cobrand/TfL.pm
+++ b/perllib/FixMyStreet/Cobrand/TfL.pm
@@ -83,7 +83,9 @@ sub base_url_for_report {
sub categories_restriction {
my ($self, $rs) = @_;
- return $rs->search( { 'body.name' => 'TfL' } );
+ $rs = $rs->search( { 'body.name' => 'TfL' } );
+ return $rs unless $self->{c}->stash->{categories_for_point}; # Admin page
+ return $rs->search( { category => { -not_in => $self->_tfl_no_resend_categories } } );
}
sub admin_user_domain { 'tfl.gov.uk' }
@@ -498,4 +500,10 @@ sub _cleaning_groups { [ 'Street cleaning' ] }
sub _tfl_council_category { 'General Litter / Rubbish Collection' }
+sub _tfl_no_resend_categories { [
+ 'General Litter / Rubbish Collection',
+ 'Other (TfL)',
+ 'Timings',
+] }
+
1;