aboutsummaryrefslogtreecommitdiffstats
path: root/perllib
diff options
context:
space:
mode:
authorDave Arter <davea@mysociety.org>2018-08-07 10:57:54 +0100
committerDave Arter <davea@mysociety.org>2018-08-17 11:04:19 +0100
commitee5b3670007d89fb749637c02dea8b33a6e702d0 (patch)
tree1ca61d3557ed51fa681ed1cd4140d5380ba89fe3 /perllib
parenteaa6187014f03499ca459761b508a95638cb629d (diff)
[Lincolnshire] Colour pins according to state
Diffstat (limited to 'perllib')
-rw-r--r--perllib/FixMyStreet/Cobrand/Lincolnshire.pm10
1 files changed, 10 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
index 32106eb4e..42103a4b4 100644
--- a/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
+++ b/perllib/FixMyStreet/Cobrand/Lincolnshire.pm
@@ -90,4 +90,14 @@ sub categories_restriction {
sub map_type { 'Lincolnshire' }
+sub pin_colour {
+ my ( $self, $p, $context ) = @_;
+ my $ext_status = $p->get_extra_metadata('external_status_code');
+ return 'yellow' if $p->state eq 'confirmed' && $ext_status && $ext_status eq '0135';
+ return 'red' if $p->state eq 'confirmed';
+ return 'green' if $p->is_fixed || $p->is_closed;
+ return 'grey' if $p->state eq 'not responsible' || !$self->owns_problem( $p );
+ return 'yellow';
+}
+
1;