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

Add delivery address to distribution "receipt"

Open cielf opened this issue 1 year ago • 24 comments

Summary

Add the address for the partner/program on the distribution printout, In addition change the prompt on program address to program / delivery address

Why?

For delivered items, having the address of the partner on this sheet will be a great help for the drop off volunteers

Details

  • Change the prompt for program address on the partner to "Program / delivery address (if different)"
  • If and only if the delivery type is delivery or shipping, add the address as "Delivery address" to the printed distribution -- this will be the program/delivery address if it is filled in, otherwise it will be the partner's address

Criteria for completion

  • [] information added to the printout as described.
  • [] tests to demonstrate that

cielf avatar Feb 25 '24 15:02 cielf

Hi, are we talking about this report here?

Screenshot 2024-03-02 at 10 28 46 PM

If so, where would we want this address to be added?

kannans5 avatar Mar 02 '24 16:03 kannans5

It is. I would add it under the "Issued to:" section. There's room there, and the flow works.

cielf avatar Mar 02 '24 18:03 cielf

@kannans5 I'm assuming that question means you want to work on this one, so I'm assigning you (so no one else takes it).

cielf avatar Mar 03 '24 13:03 cielf

yeah sure, I will work on it. One question

Change the prompt for program address on the partner to "Program / delivery address (if different)
  • where is this being currently displayed? Is it in the distribution printout?

kannans5 avatar Mar 05 '24 16:03 kannans5

If the distribution delivery method is either shipped or delivered, the print will look like this, otherwise I am not changing anything. Does that sound ok?

Screenshot 2024-03-05 at 10 26 02 PM

kannans5 avatar Mar 05 '24 16:03 kannans5

Yup, that looks about right.

cielf avatar Mar 05 '24 18:03 cielf

opened a PR, please review when you get a chance.

kannans5 avatar Mar 06 '24 16:03 kannans5

Reopening this because in the pre-release testing on staging, a delivery distribution did not have an address on print out.

cielf avatar Mar 16 '24 17:03 cielf

This issue is marked as stale due to no activity within 30 days. If no further activity is detected within 7 days, it will be unassigned.

github-actions[bot] avatar Apr 16 '24 00:04 github-actions[bot]

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Apr 23 '24 00:04 github-actions[bot]

This would be my first issue. I want to try this one, but I'm very, very new. I've been programming for a long time. I've just never worked on a GitHub issue before. I read the README, and I think I understand how to get started as far as the branch and the pull request. What else would I need to do to try this? I think: I would clone the code down to my environment, then host it myself? Then try to fix the issue on my own version, apply testing, get a code review, then do a pull request? How can I pull up these reports though? Also, the README mentions using linux for development. Do you really need to use linux to work on this project? Or is that just a joke? Anyways, any help, or clue to the right direction would help. Should I take this to the slack channel? How do I get there?

ShepherdXAutomation avatar May 02 '24 13:05 ShepherdXAutomation

Thanks for your interest! Here's the overall approach.

  • Fork the repo.
  • Clone your repo to your local machine.
  • Follow the application setup instructions to get it running.
  • Create a new branch locally.
  • Make your changes, and push them to your fork.
  • Create a pull request in this repo.
  • The pull request gets reviewed, tests and other CI steps are run.
  • If there are any failures or requested changes, make the changes and push them to your fork again.
  • Repeat the last two steps until all is good.
  • The branch gets merged and work is complete!

You do not need to work on Linux! Plenty of folks have it working on Mac or Windows.

If you have any further questions, you can get to the Slack channel here: https://join.slack.com/t/rubyforgood/shared_invite/zt-21pyz2ab8-H6JgQfGGI0Ab6MfNOZRIQA

dorner avatar May 02 '24 14:05 dorner

Thank you! I feel like I can accomplish this task. The previous user showed a picture of a document containing delivery information. How do I get this data for testing? Does it come with the repo as example data?

ShepherdXAutomation avatar May 02 '24 16:05 ShepherdXAutomation

@ShepherdXAutomation yes, when you set up your database you'll get a bunch of seed data for free. :) You can see the document by:

  • Log in as [email protected] with password password!
  • Click "Distributions"
  • Find one and click "Print"

dorner avatar May 02 '24 21:05 dorner

@ShepherdXAutomation Fair warning - it might just be that there is some weird case that I saw on staging to yank it back. I've also seen it work there

cielf avatar May 02 '24 22:05 cielf

Thank you all so much for the guidance. I’ll see how it goes. Even if I don’t solve it, getting the app setup and the seed data in place, will be good thing.

ShepherdXAutomation avatar May 03 '24 16:05 ShepherdXAutomation

Definitely!

cielf avatar May 04 '24 03:05 cielf

I'm happy to take this one, I think it's just a typo. Also, I can try to write tests using the pdf-inspector gem

jimmyli97 avatar Jul 02 '24 18:07 jimmyli97

It's yours. I think it would be cool to test the pdf if that gem is solid -- @dorner - do you have knowledge/ an opinion on it?

cielf avatar Jul 03 '24 15:07 cielf

The gem was written to test the prawn gem which is what the human-essentials app uses to generate pdfs

jimmyli97 avatar Jul 03 '24 19:07 jimmyli97

Might be overkill for this PR. The approach I tend to use when trying to test generated documents is to freeze time or any other randomized element that might be used, generate the document, save it to the test directory, and update the test to compare the generated file against the one in the repo.

dorner avatar Jul 04 '24 00:07 dorner

Automatically unassigned after 7 days of inactivity.

github-actions[bot] avatar Jul 12 '24 00:07 github-actions[bot]