diff options
author | Struan Donald <struan@exo.org.uk> | 2019-09-19 18:12:46 +0100 |
---|---|---|
committer | Struan Donald <struan@exo.org.uk> | 2019-09-27 17:43:38 +0100 |
commit | 4668f81a8242e6c00bb68ff8d85b05ab1bcdec8d (patch) | |
tree | f9b8b5a5a3c15ea96b1d9de6a0cce5a83ee7b5a7 /perllib/FixMyStreet/Cobrand/IsleOfWight.pm | |
parent | 6b01232a4108accdb4bc5f2cbca1044c1b317972 (diff) |
[IsleOfWight] limit filter category on national around page
Only display non triage categories on this because getting the category
expansion to work if we use the triage categories isn't in place and may
not be. This is because when we get the list of reports using
/around/ajax there's no way to know which body it is for so we don't
know how to expand a triage category to the list of 'child' categories.
So, just display the non triage ones for now.
Diffstat (limited to 'perllib/FixMyStreet/Cobrand/IsleOfWight.pm')
-rw-r--r-- | perllib/FixMyStreet/Cobrand/IsleOfWight.pm | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm index dd4b936d7..b43802d92 100644 --- a/perllib/FixMyStreet/Cobrand/IsleOfWight.pm +++ b/perllib/FixMyStreet/Cobrand/IsleOfWight.pm @@ -123,16 +123,13 @@ sub munge_category_list { @$options = grep { my $c = ($_->{category} || $_->category); $c =~ 'Pick a category' || $seen->{ $c } } @$options; } -sub munge_category_where { +sub munge_around_category_where { my ($self, $where) = @_; my $user = $self->{c}->user; my $b = $self->{c}->model('DB::Body')->for_areas( $self->council_area_id )->first; if ( $user && ( $user->is_superuser || $user->belongs_to_body( $b->id ) ) ) { - $where = { - body_id => $where->{body_id}, - send_method => [ { '!=' => 'Triage' }, undef ], - }; + $where->{send_method} = [ { '!=' => 'Triage' }, undef ]; return $where; } @@ -152,7 +149,7 @@ sub munge_load_and_group_problems { return $problems; } -sub munge_filter_category { +sub munge_around_filter_category_list { my $self = shift; my $c = $self->{c}; |