From 77658beb90ef44e3c878fd0eee756490d8c10496 Mon Sep 17 00:00:00 2001 From: Dave Arter Date: Wed, 20 Nov 2024 14:18:22 +0000 Subject: [PATCH] [Shropshire] Custom pin colours Not confirmed yet, just for comment. --- perllib/FixMyStreet/Cobrand/Shropshire.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/perllib/FixMyStreet/Cobrand/Shropshire.pm b/perllib/FixMyStreet/Cobrand/Shropshire.pm index 074503837bb..bf96a6ac591 100644 --- a/perllib/FixMyStreet/Cobrand/Shropshire.pm +++ b/perllib/FixMyStreet/Cobrand/Shropshire.pm @@ -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'; +} + +sub path_to_pin_icons { '/i/pins/whole-shadow-cone-spot/' } + 1;