Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only show profile reference if user is a logged in veteran #33865

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/components/ProfileNotUpdatedNote.jsx

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.
import { connect } from 'react-redux';
import { environment } from '@department-of-veterans-affairs/platform-utilities/exports';
import PropTypes from 'prop-types';
Expand All @@ -7,11 +7,18 @@
import { isLoggedIn } from 'platform/user/selectors';

function ProfileNotUpdatedNote(props) {
const { loggedIn, includePrefix, includeLink, includePhone } = props;
const {
includeLink,
includePhone,
includePrefix,
loggedIn,
preparerIsVeteran,
} = props;
const isLoggedInVeteran = loggedIn && preparerIsVeteran;

return (
<>
{loggedIn && (
{isLoggedInVeteran && (
<>
<p>
{includePrefix && <strong>Note: </strong>}
Expand Down Expand Up @@ -45,11 +52,11 @@
}

ProfileNotUpdatedNote.propTypes = {
formData: PropTypes.object,
includeLink: PropTypes.bool,
includePhone: PropTypes.bool,
includePrefix: PropTypes.bool,
loggedIn: PropTypes.bool,
preparerIsVeteran: PropTypes.bool,
};

function mapStateToProps(state) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/claimant/claimantContactMailing.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.

import {
addressSchema,
Expand All @@ -13,9 +13,7 @@
'We’ll send any important information about your form to this address.',
),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePrefix includeLink />
),
'ui:description': () => <ProfileNotUpdatedNote includeLink includePrefix />,
},
homeAddress: addressUI({
labels: {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/claimant/claimantContactPhoneEmail.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.

import {
phoneUI,
Expand All @@ -13,9 +13,7 @@
export const uiSchema = {
...titleUI('Your phone number and email address'),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePhone />
),
'ui:description': () => <ProfileNotUpdatedNote includePhone />,
},
applicantPhone: phoneUI({
required: true,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/claimant/claimantPersonalInformation.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.
import { cloneDeep } from 'lodash';

import {
Expand All @@ -17,9 +17,7 @@
export const uiSchema = {
...titleUI('Your personal information'),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePhone />
),
'ui:description': () => <ProfileNotUpdatedNote includePhone />,
},
applicantName: fullNameMiddleInitialUI,
applicantDOB: dateOfBirthUI({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/veteran/veteranContactMailing.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.

import {
addressSchema,
Expand All @@ -7,12 +7,17 @@
titleSchema,
} from 'platform/forms-system/src/js/web-component-patterns';
import ProfileNotUpdatedNote from '../../components/ProfileNotUpdatedNote';
import { preparerIsVeteran } from '../../utilities/helpers';

export const uiSchema = {
...titleUI('Your mailing address'),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePrefix includeLink />
<ProfileNotUpdatedNote
includeLink
includePrefix
preparerIsVeteran={preparerIsVeteran({ formData })}
/>
),
},
veteranHomeAddress: addressUI({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/veteran/veteranContactPhoneEmail.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.

import {
phoneUI,
Expand All @@ -10,12 +10,16 @@
} from 'platform/forms-system/src/js/web-component-patterns';

import ProfileNotUpdatedNote from '../../components/ProfileNotUpdatedNote';
import { preparerIsVeteran } from '../../utilities/helpers';

export const uiSchema = {
...titleUI(() => 'Your phone number and email address'),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePhone />
<ProfileNotUpdatedNote
includePhone
preparerIsVeteran={preparerIsVeteran({ formData })}
/>
),
},
'Primary phone': phoneUI({
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/veteran/veteranContactPhoneEmailClaimant.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.

import {
phoneUI,
Expand All @@ -14,9 +14,7 @@
export const uiSchema = {
...titleUI(() => 'Veteran’s phone number and email address'),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePhone />
),
'ui:description': () => <ProfileNotUpdatedNote includePhone />,
},
'Primary phone': phoneUI({}),
veteranEmail: emailUI(),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/veteran/veteranIdentification.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.

import {
ssnUI,
Expand Down Expand Up @@ -33,7 +33,11 @@
),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePrefix includePhone />
<ProfileNotUpdatedNote
includePhone
includePrefix
preparerIsVeteran={preparerIsVeteran({ formData })}
/>
),
},
veteranSocialSecurityNumber: ssnUI('Social Security number'),
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/veteran/veteranPersonalInformation.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.
import { cloneDeep } from 'lodash';

import {
Expand All @@ -10,8 +10,8 @@
titleSchema,
} from 'platform/forms-system/src/js/web-component-patterns';

import { preparerIsVeteran } from '../../utilities/helpers';
import ProfileNotUpdatedNote from '../../components/ProfileNotUpdatedNote';
import { preparerIsVeteran } from '../../utilities/helpers';

const fullNameMiddleInitialUI = cloneDeep(fullNameUI());
fullNameMiddleInitialUI.middle['ui:title'] = 'Middle initial';
Expand All @@ -25,7 +25,10 @@
),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePhone />
<ProfileNotUpdatedNote
includePhone
preparerIsVeteran={preparerIsVeteran({ formData })}
/>
),
},
veteranFullName: fullNameMiddleInitialUI,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React from 'react';

Check warning on line 1 in src/applications/representative-appoint/pages/veteran/veteranServiceInformation.js

View workflow job for this annotation

GitHub Actions / App Isolation Annotations

Staged Continuous Deployment App Isolation Conflict

*WARNING* This PR contains changes related to an application that is currently not isolated. As of Feb 3, 2025 deployment may no longer be possible for apps that are not isolated. Please isolate this app from other directories in 'src/applications' to prevent future deployment issues. More information on your app's status can be seen here: https://department-of-veterans-affairs.github.io/veteran-facing-services-tools/frontend-support-dashboard/cross-app-import-report Please reach out to Frontend Platform Support with any questions.

import {
radioSchema,
Expand All @@ -19,7 +19,10 @@
),
profileNotUpdatedNote: {
'ui:description': formData => (
<ProfileNotUpdatedNote formData={formData} includePhone />
<ProfileNotUpdatedNote
includePhone
preparerIsVeteran={preparerIsVeteran({ formData })}
/>
),
},
'Branch of Service': radioUI('Branch of service'),
Expand Down
Loading