Update grant approved email to show combined reimbursement total#4541
Update grant approved email to show combined reimbursement total#4541
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
@claude do the code review |
|
Claude finished @estyxx's task in 1m 16s —— View job Code Review
Overall, this is a well-structured PR that simplifies the email placeholder logic. The changes are clean and the test coverage is thorough. I have a few observations: ✅ What looks good
|
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #4541 +/- ##
=======================================
Coverage 94.43% 94.43%
=======================================
Files 352 352
Lines 10162 10166 +4
Branches 738 737 -1
=======================================
+ Hits 9596 9600 +4
Misses 468 468
Partials 98 98 🚀 New features to boost your workflow:
|
7b82d48 to
c1680ce
Compare
|
@claude do the final code review |
|
Claude finished @estyxx's task in 50s —— View job Final Code Review
This PR is ready to merge. The implementation is clean, well-tested, and achieves the stated goal of simplifying grant email placeholders. Summary of Changes
✅ What Looks Good
|
c1680ce to
31b3253
Compare
|
@claude do the code review |
|
Claude finished @estyxx's task in 1m 22s —— View job Code Review
This PR simplifies the grant approved email by replacing per-category placeholders with a single ✅ What Looks Good
|
31b3253 to
b98e030
Compare
|
@claude do the code review again |
|
Claude finished @estyxx's task in 48s —— View job Code Review
This PR simplifies the grant approved email by replacing per-category placeholders with a combined ✅ What Looks Good
|
- Add has_approved_ticket(), has_ticket_only() methods to Grant model - Add total_grantee_reimbursement_amount property (excludes ticket) - Refactor has_approved() to be base method for all has_approved_* methods - Replace old placeholders (has_approved_travel, has_approved_accommodation, travel_amount) with simpler total_amount and ticket_only - Update plain_cards to show total reimbursement instead of just travel - Update visa/models.py to use has_approved_ticket() - Add comprehensive tests for new model methods This allows showing grantees a single total amount they can use flexibly for travel and/or accommodation, rather than separate category amounts.
b98e030 to
f44d5eb
Compare
Summary
has_approved_ticket(),has_ticket_only()methods to Grant modeltotal_grantee_reimbursement_amountproperty (excludes ticket)has_approved()to be base method for allhas_approved_*methodshas_approved_travel,has_approved_accommodation,travel_amount) with simplertotal_amountandticket_onlyhas_approved_ticket()This allows showing grantees a single total amount they can use flexibly for travel and/or accommodation, rather than separate category amounts.
New Email Template Variables
{{ total_amount }}- total reimbursement (excluding ticket), formatted as string, orNoneif zero{{ ticket_only }}-Trueif grant has only ticket, no travel or accommodationRemoved Variables
has_approved_travelhas_approved_accommodationtravel_amountAfter merging
Test plan
has_approved_ticket()has_ticket_only()total_grantee_reimbursement_amount