voices-of-consent
voices-of-consent copied to clipboard
Add UI for receipt_file_uploads via ActiveStorage to Purchase
- we have enabled ActiveStorage, so have the database and model set up, but no UI on Purchase form yet
@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?
Thanks, @z3ugma !
There are two workflows re uploading receipt_file_uploads
:
-
From
/admin
, go to the/purchases
index and click "New Purchase" (this link doesn't exist yet, but would get added toviews/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.) -
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 theshipping_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. :)
Cool, that's enough background to go on I think. Can you assign me this one @maebeale ?
Sure can! Thank you, @z3ugma !
@z3ugma hello ! hope you are well! are you still planning to work on this?