human-essentials icon indicating copy to clipboard operation
human-essentials copied to clipboard

3343 partner profile[WIP]

Open jadekstewart3 opened this issue 1 year ago • 6 comments

Checklist:

  • I have performed a self-review of my own code,
  • I have commented my code, particularly in hard-to-understand areas,
  • I have made corresponding changes to the documentation,
  • I have added tests that prove my fix is effective or that my feature works,
  • New and existing unit tests pass locally with my changes ("bundle exec rake"),
  • Title include "WIP" if work is in progress.

-->

Resolves #3343

Description

Begin removing program address if different card from the agency stability partial, and placing it in its own partial to be rendered accordingly.

###Todo [] Test that agency selections are maintained during profile update [] Locate second place that new partial needs to be rendered [] Test new location also

Type of change

  • New feature (non-breaking change which adds functionality)

How Has This Been Tested?

Screenshots

jadekstewart3 avatar Jan 22 '24 18:01 jadekstewart3

Hey @jadekstewart3 -- a question rather than an actual review.... You are proposing a new partial -- Is the partial that this is currently in one of the ones that the organization controls the appearance of ? There is a field in the "My Organizations" for the bank around this. Just a sanity check.

cielf avatar Jan 22 '24 23:01 cielf

pinging @jadekstewart3 on this -- there was an open question.

cielf avatar Feb 13 '24 23:02 cielf

@cielf Thank you for pinging me, I put this ticket on the back burner until I get the kits sorted. If I understand your correctly, I was thinking of moving that field to a new partial, but I actually was unable to find the field under banks, only for the partners.. Does that answer your question?

jadekstewart3 avatar Feb 14 '24 01:02 jadekstewart3

I looked into it -- the agency information partial is always shown -- several of the others are controlled by the bank choosing whether the partners see them or not. So the program address should also always be shown. In other words, there is nothing to be done re my question.

cielf avatar Feb 16 '24 02:02 cielf

@cielf So, if I'm understanding correctly, this ticket is no longer necessary? (Sorry, Im skeptical when there is less work to be done lol)

jadekstewart3 avatar Feb 16 '24 17:02 jadekstewart3

@jadekstewart3 Ummm.. no - the moving of the fields is still necessary -- what isn't necessary is the extra work of making your new partial optional -- because the original partial is always shown, I'm assuming, at least for now, that we will always show this one.

cielf avatar Feb 16 '24 20:02 cielf

@jadekstewart3 is this still under development? There's been no activity in quite a while.

dorner avatar Apr 05 '24 20:04 dorner

Hey @dorner, I've been juggling a few things lately, but I'm ready to dive back into this task whenever you need me to. If someone else wants to give it a shot, I'm cool with that too. Just let me know! Thanks!

jadekstewart3 avatar Apr 11 '24 17:04 jadekstewart3

@jadekstewart3 if you're good with picking it up again, please do!

dorner avatar Apr 11 '24 19:04 dorner

@dorner or @cielf In diaper_bank/manage/edit there currently are not fields for Program address (if different) if I am understanding correctly, because the Program address (if different ) fields are not currently present for the bank edit, would you like me to add that section in?

Or create an optional partial, to display if the current address fields have values? I remember @cielf saying that the optional partial was not necessary, but digging into it I am seeing a use case for it since it seems like we would be re using this section of code, so I just wanted to check :)

jadekstewart3 avatar Apr 17 '24 15:04 jadekstewart3

I just edited a partner as [email protected] on staging, and there is a "Program / Delivery Address (if different)". I think we added in the Delivery bit after the issue was originated.

Oh. I see the issue -- diaper_bank/manage/edit would be editing the information for the diaper bank. We're talking about (for example) diaper_bank/profiles/2/edit -- which is editing the profile information for a partner.

cielf avatar Apr 17 '24 20:04 cielf

Screenshot 2024-04-18 at 4 11 17 PM

@cielf - I think I'm all finished with this, but rubocop is not passing CI for some reason? Locally its passing

jadekstewart3 avatar Apr 18 '24 22:04 jadekstewart3

Yeah -- the CI also calls erblint, (the command in ci seems to be Run bundle exec erblint --lint-all) . This is catching a trailing newline in app/views/partners/profiles/edit/_agency_information.html.erb:58

cielf avatar Apr 19 '24 00:04 cielf

Hey @jadekstewart3 -- going ahead and kicking the tires on this -- I figure the erblint issue noted above will be exceedingly minor to fix.

Please check throughout that the heading for that group of fields is "Program / Delivery Address (if different)". I'm seeing a couple different variations of it. (I think we might have put the "Delivery" part of the label in after you started on this the first time.)

When viewing, the section should show whether or not the fields are filled in. (That's how it works on staging, and I don't know of a business reason to change it.)

Thanks!

cielf avatar Apr 19 '24 20:04 cielf

@cielf I think I have addressed what you've asked. ~I have an RSpec failure, but I suspect it may be due to flakey tests, and not my code.~ All checks are now passing :)

jadekstewart3 avatar Apr 22 '24 15:04 jadekstewart3

I've got a block of work on HE slotted for tomorrow, will try to get to this then.

cielf avatar Apr 22 '24 22:04 cielf

LGTM -- @dorner.. Do you want to take a quick look for any technical concerns?

cielf avatar Apr 23 '24 15:04 cielf

All good on my end!

dorner avatar Apr 25 '24 14:04 dorner

@jadekstewart3: Your PR 3343 partner profile is part of today's Human Essentials production release: 2024.04.28. Thank you very much for your contribution!

github-actions[bot] avatar Apr 29 '24 01:04 github-actions[bot]