Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Merton] Garden waste #4925

Open
wants to merge 3 commits into
base: merton-ww-initial
Choose a base branch
from
Open

[Merton] Garden waste #4925

wants to merge 3 commits into from

Conversation

dracos
Copy link
Member

@dracos dracos commented Apr 17, 2024

Starts off the same as the bulky branch for the rename/payment provider, then some tidying, then one more commit for the initial garden stuff. Has the changes asked for regarding everyone picking between 140L/240L/sacks.

For https://github.com/mysociety/societyworks/issues/4272 [skip changelog]

Copy link

codecov bot commented Apr 17, 2024

Codecov Report

Attention: Patch coverage is 88.23529% with 22 lines in your changes are missing coverage. Please review.

Project coverage is 82.66%. Comparing base (0c9bf34) to head (a9a43d3).

Files Patch % Lines
perllib/FixMyStreet/Roles/Cobrand/Adelante.pm 68.51% 10 Missing and 7 partials ⚠️
perllib/Integrations/Adelante.pm 92.68% 1 Missing and 2 partials ⚠️
perllib/FixMyStreet/Cobrand/Merton/Waste.pm 90.00% 0 Missing and 2 partials ⚠️
Additional details and impacted files
@@                  Coverage Diff                  @@
##           merton-ww-initial    #4925      +/-   ##
=====================================================
+ Coverage              82.64%   82.66%   +0.01%     
=====================================================
  Files                    397      400       +3     
  Lines                  30799    30935     +136     
  Branches                4861     4878      +17     
=====================================================
+ Hits                   25453    25571     +118     
- Misses                  3896     3905       +9     
- Partials                1450     1459       +9     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@dracos dracos requested review from neprune and removed request for neprune May 14, 2024 11:36
END;
%]

[% BLOCK answers %]
<div class="govuk-summary-list__row">
<dt class="govuk-summary-list__key govuk-summary-list__key--sub">Green garden waste subscription</dt>
<dt class="govuk-summary-list__key govuk-summary-list__key--sub">Green garden waste collection</dt>
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why has this been changed from 'subscription'? And why the different 'step1' for 'Renew'?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The word change is because that's what it said in the (now gone) renew template and I wanted to merge the two and that seemed like the better wording. The different step1 is because the subscription flow has a static "intro" page before the bit you'd like to edit, whereas the renew flow does not.

my %sack_num = (
sutton => 20,
kingston => 10,
merton => 25,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the Merton num used anywhere?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be used a few lines down - in the display of the sack container line?


return unless $c->stash->{is_staff};

$c->stash->{staff_payments_allowed} = 'cnp';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What does 'cnp' stand for?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cardholder Not Present.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a flag for Roles::Cobrand::Adelante to use to say if staff or not, so could really be anything - there's also "paye" which then doesn't redirect elsewhere but shows a form to fill in.

@@ -97,9 +97,6 @@ sub available_permissions {

sub waste_auto_confirm_report { 1 }

sub waste_staff_choose_payment_method { 1 }
sub waste_cheque_payments { shift->{c}->stash->{staff_payments_allowed} }

use constant CONTAINER_REFUSE_140 => 1;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if any of these can be removed from here / refactored into SLWP.pm, as there seems to be a fair bit of overlap.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, is true, I wondered if I could put the constants somewhere, but I'm not sure how I'd easily refer to them (I wouldn't want to put $self-> in front of them all, for example). Probably technically should have some form of class to handle the containers or something, but didn't seem worth it.

$container = CONTAINER_GARDEN_BIN_140;
} elsif ($choice eq 'bin240') {
$container = CONTAINER_GARDEN_BIN;
} elsif ($choice) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could remove the checks for $choice eq 'bin240' and $choice because everything defaults to CONTAINER_GARDEN_BIN in the final else.

Copy link
Member Author

@dracos dracos May 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I could remove the bin240, though decided to leave it in to be clear, but can't remove $choice entirely because if choice exists it needs to take precedence over $existing (which could be something else), if you see what I mean.

templates/web/merton/waste/garden/renew_bin_desc.html Outdated Show resolved Hide resolved
templates/web/merton/waste/garden/subscribe_intro.html Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants