Skip to content

Commit

Permalink
(freeCodeCamp#119-3)To make it look a bit more receipt like, table wi…
Browse files Browse the repository at this point in the history
…th EIN
  • Loading branch information
ronaldblanco committed Sep 27, 2017
1 parent a85360d commit 3ec2605
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/placeholders.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ const placeholders = [
{id: 'url', label: 'Foodbank Website'},
{id: 'clientIntakeNumber', label: 'Client Intake Number'},
{id: 'supportNumber', label: 'Support Number'},
{id: 'EIN', label: 'EIN Number'},

{id: 'firstName', label: 'User First Name', type: placeholderTypes.EMAIL},
{id: 'lastName', label: 'User Last Name', type: placeholderTypes.EMAIL},
Expand Down
2 changes: 1 addition & 1 deletion server/config/mailer.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ export default async function sendEmail(
path: '/v3/mail/send',
body: mail.toJSON()
})

//console.log(content)
return sg.API(request)
}
21 changes: 21 additions & 0 deletions server/lib/seed/seed-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,27 @@ export const pages = [{
type: pageTypes.EMAIL,
subject: '<p>Receipt for Your Donation to <span class="ql-placeholder-content" data-id="organization" data-label="Foodbank Name"></span></p>',
body: `<p>Dear <span class="ql-placeholder-content" data-id="fullName" data-label="User Full Name"></span>,</p>
<p>Thanks for your donations to:</p>
<table>
<tr>
<td>Organization:</td><td><span class="ql-placeholder-content" data-id="organization" data-label="Foodbank Name"></span></td>
</tr>
<tr>
<td>Foodbank Address:</td><td><span class="ql-placeholder-content" data-id="address" data-label="Foodbank Address"></span></td>
</tr>
<tr>
<td>Foodbank Website:</td><td><span class="ql-placeholder-content" data-id="url" data-label="Foodbank Website"></span></td>
</tr>
<tr>
<td>Client Intake Number:</td><td><span class="ql-placeholder-content" data-id="clientIntakeNumber" data-label="Client Intake Number"></span></td>
</tr>
<tr>
<td>Support Number:</td><td><span class="ql-placeholder-content" data-id="supportNumber" data-label="Support Number"></span></td>
</tr>
<tr>
<td>EIN Number:</td><td><span class="ql-placeholder-content" data-id="EIN" data-label="EIN Number"></span></td>
</tr>
</table>
<p>Here you have a list of the donations our organization recibed from you:</p>
<p><span class="ql-placeholder-content" data-id="items" data-label="Donation Receipt information" data-required="true"></span></p>`
}]
Expand Down
2 changes: 1 addition & 1 deletion server/models/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ const SettingsSchema = new Schema({
EIN: {
type: String,
trim: true,
default: ''
default: '0'
},
})

Expand Down

0 comments on commit 3ec2605

Please sign in to comment.