Skip to content

Commit

Permalink
[Shropshire] Custom pin colours
Browse files Browse the repository at this point in the history
Not confirmed yet, just for comment.
  • Loading branch information
davea committed Nov 21, 2024
1 parent e58d6f2 commit 46a50af
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions perllib/FixMyStreet/Cobrand/Shropshire.pm
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,24 @@ sub dashboard_export_problems_add_columns {
});
}

=head2 pin_colour
Green for completed or closed, yellow for open,
blue for anything else (in progress, action scheduled, etc)
=cut

sub pin_colour {
my ( $self, $p ) = @_;

return 'green' if $p->is_fixed || $p->is_closed;
return 'yellow' if $p->state eq 'confirmed';
return 'defects';

Check warning on line 214 in perllib/FixMyStreet/Cobrand/Shropshire.pm

View check run for this annotation

Codecov / codecov/patch

perllib/FixMyStreet/Cobrand/Shropshire.pm#L214

Added line #L214 was not covered by tests
}

sub path_to_pin_icons {
return '/cobrands/oxfordshire/images/';
}


1;

0 comments on commit 46a50af

Please sign in to comment.