diff --git a/src/applications/representative-appoint/containers/NextStepsPage.jsx b/src/applications/representative-appoint/containers/NextStepsPage.jsx
index 685324affa77..44f381cc00a4 100644
--- a/src/applications/representative-appoint/containers/NextStepsPage.jsx
+++ b/src/applications/representative-appoint/containers/NextStepsPage.jsx
@@ -24,7 +24,7 @@ export default function NextStepsPage() {
return (
Your next steps
@@ -43,7 +43,11 @@ export default function NextStepsPage() {
After your form is signed, you or the accredited {repType} can submit it
online, by mail, or in person.
-
+
After you submit your printed form
diff --git a/src/applications/representative-appoint/utilities/pdfTransform.js b/src/applications/representative-appoint/utilities/pdfTransform.js
index b357e76d2627..e2679763b09e 100644
--- a/src/applications/representative-appoint/utilities/pdfTransform.js
+++ b/src/applications/representative-appoint/utilities/pdfTransform.js
@@ -1,7 +1,7 @@
import { getRepType } from './helpers';
function consentLimitsTransform(formData) {
- const authorizeRecords = formData['view:authorizeRecordsCheckbox'] || {};
+ const authorizeRecords = formData.authorizeMedicalSelectCheckbox || {};
const conditionsMap = {
alcoholRecords: 'ALCOHOLISM',
@@ -15,6 +15,13 @@ function consentLimitsTransform(formData) {
.map(([, value]) => value);
}
+function yesNoToBoolean(field) {
+ if (typeof field !== 'string') {
+ return null;
+ }
+ return !!field.trim().startsWith('Yes');
+}
+
export function pdfTransform(formData) {
const {
veteranFullName,
@@ -29,14 +36,17 @@ export function pdfTransform(formData) {
applicantName,
applicantDOB,
claimantRelationship,
+ 'Branch of Service': serviceBranch,
homeAddress: claimantAddress,
authorizationRadio,
authorizeAddressRadio,
+ authorizeInsideVARadio,
+ authorizeOutsideVARadio,
+ authorizeNamesTextArea,
applicantPhone,
applicantEmail,
} = formData;
- // extracts address information
const createAddress = (address = {}) => ({
addressLine1: address.street || '',
addressLine2: address.street2 || '',
@@ -47,7 +57,6 @@ export function pdfTransform(formData) {
zipCodeSuffix: address.zipCodeSuffix || '',
});
- // construct veteran object
const veteran = {
name: {
first: veteranFullName?.first || '',
@@ -58,7 +67,7 @@ export function pdfTransform(formData) {
vaFileNumber,
dateOfBirth,
serviceNumber,
- insuranceNumbers: [],
+ serviceBranch,
address: createAddress(homeAddress),
phone,
email,
@@ -102,9 +111,14 @@ export function pdfTransform(formData) {
return {
veteran,
- recordConsent: authorizationRadio || '',
- consentAddressChange: authorizeAddressRadio || '',
+ recordConsent: yesNoToBoolean(authorizationRadio),
+ consentAddressChange: yesNoToBoolean(authorizeAddressRadio),
consentLimits: consentLimitsTransform(formData),
+ consentInsideAccess: yesNoToBoolean(authorizeInsideVARadio),
+ consentOutsideAccess: yesNoToBoolean(authorizeOutsideVARadio),
+ consentTeamMembers: authorizeNamesTextArea
+ .split(',')
+ .map(item => item.trim()),
representative,
...(formData['view:applicantIsVeteran'] === 'No' && { claimant }),
};