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 authored and dracos committed Dec 12, 2024
1 parent 3b166fd commit 77658be
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions perllib/FixMyStreet/Cobrand/Shropshire.pm
Original file line number Diff line number Diff line change
Expand Up @@ -199,4 +199,21 @@ 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-tick' if $p->is_fixed || $p->is_closed;
return 'yellow-cone' if $p->state eq 'confirmed';
return 'blue-work';

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 { '/i/pins/whole-shadow-cone-spot/' }

1;

0 comments on commit 77658be

Please sign in to comment.