pantry-for-good icon indicating copy to clipboard operation
pantry-for-good copied to clipboard

Need to have a generalized donation receipt that can be customized with the organization's name, EIN, contact info, etc.

Open jasonsreynolds opened this issue 7 years ago • 19 comments

jasonsreynolds avatar Jun 15 '17 19:06 jasonsreynolds

Can you give an list of exactly what fields might be needed, or how variable is this stuff likely to be? Maybe it should be possible to add arbitrary fields to the general settings section.

jspaine avatar Jun 15 '17 20:06 jspaine

I think to finish this there needs to be something like:

  • [x] An EIN field in the general settings

  • [x] A new placeholder for the receipt in common/placeholders. It should be required and added to the email during db seeding, like the password reset url placeholder. It should render a table with the donated items and values and total.

  • [x] To make it look a bit more receipt like, there could be another table as part of the donation receipt with the organization details and EIN number from general settings.

  • [x] Instead of having the EIN field hard coded there could be a settings section for extra receipt related fields, similar to the create donation items fields and household section on the customer application. So by default it would be one field, Name: EIN, Value: whatever, but you could rename it or add other fields appropriate for your country.

  • [ ] Bonus if an example table can be rendered inside the editor too

jspaine avatar Aug 22 '17 14:08 jspaine

Hello Jspaine Hey I am back, and I saw someone it is working on the issue 171. I will be working on this. In the "An EIN field in the general settings" do you only need the field with that name??

Thanks.

ronaldblanco avatar Sep 20 '17 20:09 ronaldblanco

Hey, welcome back!

Yeah just that field is fine.

jspaine avatar Sep 20 '17 22:09 jspaine

Hey I did a pull request for the "An EIN field in the general settings" problem, this time I did check the eslint (server an client) to avoid future problems. I will be checking the placeholder need (2 point) and I will ask you if I need your help.

Thanks.

ronaldblanco avatar Sep 21 '17 15:09 ronaldblanco

Hey I need help; I am trying to play as a donor (to test my changes) but before make anything I am unable to add my own donations (as a donor user); I get constantly error 401, unauthorized user on my console of the server. Do I am missing something?? I had tried creating the user with the application and also writing directed to the database, but, same result all the time.
Thanks.

ronaldblanco avatar Sep 21 '17 22:09 ronaldblanco

Hi, @ronaldblanco I think I found the issue, and added a pull request to fix it.

davycheung avatar Sep 22 '17 00:09 davycheung

Thanks @davycheung, I will be testing it.

ronaldblanco avatar Sep 22 '17 13:09 ronaldblanco

Hello everyone;

I am working on the second point of this issue but I am unable to make my tests; what do I need to get my local app sending email so I can test my changes?? I have enable the google authentication and map. My donor account also have a real email on it. What else do I need?

Thanks.

ronaldblanco avatar Sep 22 '17 21:09 ronaldblanco

You need a sendgrid account, set up an api key and add it to server/config/env/secrets.js.

I'd just add a console.log to the sendEmail function in server/config/mailer.js though.

jspaine avatar Sep 23 '17 11:09 jspaine

Hello @jspaine and thanks for the advise. Hey I did a pull request I just leave a couple of comments in the code to test the result in the case I have to still made some changes. So let me know how you see this.

Thanks for your help.

ronaldblanco avatar Sep 25 '17 15:09 ronaldblanco

Hey, can someone give me more detailed information about what is wanted in the 4 point?

Thanks.

ronaldblanco avatar Sep 26 '17 12:09 ronaldblanco

Was thinking to make it look a bit more receipt like, there could be another table as part of the donation receipt with the organization details and EIN number from general settings.

Then, instead of having the EIN field hard coded there could be a settings section for extra receipt related fields, similar to the create donation items fields and household section on the customer application. So by default it would be one field, Name: EIN, Value: whatever, but you could rename it or add other fields appropriate for your country.

I'll split that part into those 2 steps if you want to just try one to start.

jspaine avatar Sep 26 '17 20:09 jspaine

OK @jspaine; let me know when the split is ready so I begin with the first step. Thanks.

ronaldblanco avatar Sep 26 '17 21:09 ronaldblanco

Just meant I'd update the comment at the top with the list of objectives, it's done now.

jspaine avatar Sep 27 '17 06:09 jspaine

I will be working on the 3 point.

ronaldblanco avatar Sep 27 '17 20:09 ronaldblanco

Hey @jspaine, check this pull request and tell me if that is the idea of the 3 point.

Thanks.

ronaldblanco avatar Sep 27 '17 22:09 ronaldblanco

Hey @jspaine, could you help me with more info about the 4 point here?? The idea I get it is to do the ein field not part of the model; but in that case where will you put it?? I think I am missing something here.

Thanks

ronaldblanco avatar Oct 04 '17 19:10 ronaldblanco

Hey, no it'll still be part of the model. just in an array of receiptFields or something. So you'd define a receiptFieldsSchema like

{
  name: {
    type: String,
    required: true
  },
  value: {
    type: String,
    required: true
  }
}

then in the settings schema:

...
receiptFields: [receiptFieldsSchema]
...

jspaine avatar Oct 04 '17 20:10 jspaine