-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
47fe544
commit ce9d008
Showing
5 changed files
with
55 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'va_notify/notification_email/saved_claim' | ||
|
||
module Burials | ||
class NotificationEmail < ::VANotify::NotificationEmail::SavedClaim | ||
# @see VANotify::NotificationEmail::SavedClaim | ||
def initialize(saved_claim) | ||
super(saved_claim, service_name: 'burials') | ||
end | ||
|
||
private | ||
|
||
def personalization | ||
default = super | ||
|
||
facility_name, street_address, city_state_zip = claim.regional_office | ||
veteran_name = "#{claim.veteran_first_name} #{claim.veteran_last_name&.first}" | ||
benefits_claimed = " - #{claim.benefits_claimed.join(" \n - ")}" | ||
|
||
default.merge({ | ||
'form_name' => 'Burial Benefit Claim (Form 21P-530)', | ||
'deceased_veteran_first_name_last_initial' => veteran_name, | ||
'benefits_claimed' => benefits_claimed, | ||
'facility_name' => facility_name, | ||
'street_address' => street_address, | ||
'city_state_zip' => city_state_zip, | ||
# override default | ||
'first_name' => claim.claimaint_first_name&.upcase | ||
}) | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters