voices-of-consent icon indicating copy to clipboard operation
voices-of-consent copied to clipboard

Add UI for receipt_file_uploads via ActiveStorage to Purchase

Open maebeale opened this issue 5 years ago • 5 comments

  • we have enabled ActiveStorage, so have the database and model set up, but no UI on Purchase form yet

maebeale avatar Oct 10 '19 15:10 maebeale

@maebeale I'm interested in taking this one:

What's the workflow for getting to the Purchase form?

It looks like I need a User with a Volunteer app/views/purchases/new.html.erb has a standard simple_form. I'll plan to add something like <%= f.input :receipt_file_uploads, as: :file, label: "Upload Receipts" %>

Are we planning to use React at all in the Purchases CRUD?

z3ugma avatar Oct 15 '19 18:10 z3ugma

Thanks, @z3ugma !

There are two workflows re uploading receipt_file_uploads:

  1. From /admin, go to the /purchases index and click "New Purchase" (this link doesn't exist yet, but would get added to views/shared/_sidebar.html.erb. In this case, the User would be logging any purchase they make. We prob will want to flesh this out further to be able to associate InventoryTallies and create InventoryAdjustments to keep the stock connected to specific Purchases. (Haven't thought through this scenario fully yet. Would love suggestions.)

  2. On BoxShipment#new, Shippers would upload the receipt of the payment (Purchase) they made to ship the package. BoxShipmentController would then create a Purchase and connect it to the Box that was Shipped via the shipping_payment association. 2a. Another option for this would be to log a Purchase, and associate several Boxes (and relevant tracking #'s) from one UI. Bc I'm sure sometimes the Shipper is Shipping in bulk, and we wouldn't need them to necessarily get a different receipt for each package, and/or to log each BoxShipment individually.

No explicit plans to use React, but am definitely open to that. Does the above answer what you were asking? Hopefully it isn't TMI. :)

maebeale avatar Oct 15 '19 19:10 maebeale

Cool, that's enough background to go on I think. Can you assign me this one @maebeale ?

z3ugma avatar Oct 17 '19 14:10 z3ugma

Sure can! Thank you, @z3ugma !

maebeale avatar Oct 17 '19 14:10 maebeale

@z3ugma hello ! hope you are well! are you still planning to work on this?

maebeale avatar Feb 12 '20 21:02 maebeale