diff --git a/backend/grant/admin/example_emails.py b/backend/grant/admin/example_emails.py index 076d034a..67f2c706 100644 --- a/backend/grant/admin/example_emails.py +++ b/backend/grant/admin/example_emails.py @@ -37,6 +37,7 @@ class FakeUpdate(object): user = FakeUser() proposal = FakeProposal() +milestone = FakeMilestone() contribution = FakeContribution() update = FakeUpdate() @@ -160,6 +161,7 @@ example_email_args = { }, 'milestone_paid': { 'proposal': proposal, + 'milestone': milestone, 'amount': '33', 'tx_explorer_url': 'http://someblockexplorer.com/tx/271857129857192579125', 'proposal_milestones_url': 'http://zfnd.org/proposals/999-my-proposal?tab=milestones', diff --git a/backend/grant/admin/views.py b/backend/grant/admin/views.py index a3397c72..7dfd0797 100644 --- a/backend/grant/admin/views.py +++ b/backend/grant/admin/views.py @@ -432,6 +432,7 @@ def paid_milestone_payout_request(id, mid, tx_id): for member in proposal.team: send_email(member.email_address, 'milestone_paid', { 'proposal': proposal, + 'milestone': ms, 'amount': amount, 'tx_explorer_url': f'{EXPLORER_URL}transactions/{tx_id}', 'proposal_milestones_url': make_url(f'/proposals/{proposal.id}?tab=milestones'), @@ -568,7 +569,7 @@ def get_contributions(page, filters, search, sort): @body({ "proposalId": fields.Int(required=True), "userId": fields.Int(required=True), - "status": fields.Str(required=True, validate=validate.OneOf(choices=RFPStatus.list())), + "status": fields.Str(required=True, validate=validate.OneOf(choices=ContributionStatus.list())), "amount": fields.Str(required=True), "txId": fields.Str(required=False, missing=None) }) @@ -607,7 +608,7 @@ def get_contribution(contribution_id): @body({ "proposalId": fields.Int(required=False, missing=None), "userId": fields.Int(required=False, missing=None), - "status": fields.Str(required=True, validate=validate.OneOf(choices=RFPStatus.list())), + "status": fields.Str(required=True, validate=validate.OneOf(choices=ContributionStatus.list())), "amount": fields.Str(required=False, missing=None), "txId": fields.Str(required=False, missing=None), "refundTxId": fields.Str(required=False, allow_none=True, missing=None), diff --git a/backend/grant/email/send.py b/backend/grant/email/send.py index 1c09b359..8121e567 100644 --- a/backend/grant/email/send.py +++ b/backend/grant/email/send.py @@ -269,7 +269,7 @@ def milestone_accept(email_args): def milestone_paid(email_args): p = email_args['proposal'] a = email_args['amount'] - ms = p.current_milestone + ms = email_args['milestone'] return { 'subject': f'{p.title} - {ms.title} has been paid!', 'title': f'Milestone paid', diff --git a/backend/grant/templates/emails/milestone_paid.html b/backend/grant/templates/emails/milestone_paid.html index 94084e60..572aee3c 100644 --- a/backend/grant/templates/emails/milestone_paid.html +++ b/backend/grant/templates/emails/milestone_paid.html @@ -1,7 +1,7 @@
Hooray! {{ args.amount }} ZEC has been paid out for - {{ args.proposal.title }} - {{ args.proposal.current_milestone.title }}! You can view the transaction below:
diff --git a/backend/grant/templates/emails/milestone_paid.txt b/backend/grant/templates/emails/milestone_paid.txt index d2177a85..2fc1044b 100644 --- a/backend/grant/templates/emails/milestone_paid.txt +++ b/backend/grant/templates/emails/milestone_paid.txt @@ -1,4 +1,4 @@ -Hooray! {{args.amount}} ZEC has been paid out for "{{ args.proposal.title }} - {{args.proposal.current_milestone.title }}"! +Hooray! {{args.amount}} ZEC has been paid out for "{{ args.proposal.title }} - {{args.milestone.title }}"! You can view the transaction below: {{ args.tx_explorer_url }} diff --git a/frontend/client/components/Placeholder/index.tsx b/frontend/client/components/Placeholder/index.tsx index 618fb556..e6626cc6 100644 --- a/frontend/client/components/Placeholder/index.tsx +++ b/frontend/client/components/Placeholder/index.tsx @@ -10,7 +10,7 @@ interface Props { } const Placeholder: React.SFC