-
Notifications
You must be signed in to change notification settings - Fork 128
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[96896] Appoint a Rep dynamic authorizations (#33248)
* dynamic authorizations * add unit tests for auth components * cleanup use of props and redux
- Loading branch information
Showing
26 changed files
with
1,311 additions
and
185 deletions.
There are no files selected for viewing
23 changes: 23 additions & 0 deletions
23
src/applications/representative-appoint/components/AddressAuthorizationDescription.jsx
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,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { getRepType } from '../utilities/helpers'; | ||
|
||
const AddressAuthorizationDescription = ({ formData }) => { | ||
return ( | ||
<> | ||
<h3>Authorization to change your address</h3> | ||
<p className="appoint-text"> | ||
This accredited {getRepType(formData['view:selectedRepresentative'])}{' '} | ||
can help you change the address on your VA records. If the address on | ||
your VA records is incorrect or outdated, it may take us longer to | ||
contact you and process your benefit claims. | ||
</p> | ||
</> | ||
); | ||
}; | ||
|
||
AddressAuthorizationDescription.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
export { AddressAuthorizationDescription }; |
56 changes: 56 additions & 0 deletions
56
src/applications/representative-appoint/components/AddressAuthorizationPolicy.jsx
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,56 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import { getFormNumber } from '../utilities/helpers'; | ||
|
||
const AddressAuthorizationPolicy = props => { | ||
const { formData } = props; | ||
|
||
return ( | ||
<div className="vads-u-margin-y--3"> | ||
<va-accordion uswds bordered open-single> | ||
<va-accordion-item bordered header="Our address authorization policy"> | ||
{getFormNumber(formData) === '21-22' ? ( | ||
<p data-testid="address-authorization-policy-2122"> | ||
<strong>I authorize</strong> any official representative of the | ||
organization named in Item 15 to act on my behalf to change my | ||
address in my VA records. This authorization does not extend to | ||
any other organization without my further written consent. This | ||
authorization will remain in effect until the earlier of the | ||
following events: (1) I revoke this authorization by filing a | ||
written revocation with VA; or (2) I appoint another | ||
representative, or (3) I have been determined unable to manage my | ||
financial affairs and the individual or organization named in Item | ||
16A is not my appointed fiduciary. | ||
</p> | ||
) : ( | ||
<p data-testid="address-authorization-policy-2122a"> | ||
<strong>I authorize</strong> the individual named in Item 16A to | ||
act on my behalf to change my address in my VA records. This | ||
authorization does not extend to any other individual without my | ||
further written consent. This authorization will remain in effect | ||
until the earlier of the following events: (1) I revoke this | ||
authorization by filing a written revocation with VA; or (2) I | ||
revoke the appointment of the individual named in Item 16A, either | ||
by explicit revocation or the appointment of another | ||
representative. | ||
</p> | ||
)} | ||
</va-accordion-item> | ||
</va-accordion> | ||
</div> | ||
); | ||
}; | ||
|
||
AddressAuthorizationPolicy.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
const mapStateToProps = state => ({ | ||
formData: state.form?.data || {}, | ||
}); | ||
|
||
export default connect( | ||
mapStateToProps, | ||
null, | ||
)(AddressAuthorizationPolicy); |
23 changes: 23 additions & 0 deletions
23
src/applications/representative-appoint/components/InsideVAAuthorizationDescription.jsx
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,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { getRepType } from '../utilities/helpers'; | ||
|
||
const InsideVAAuthorizationDescription = ({ formData }) => { | ||
return ( | ||
<> | ||
<h3>Authorization for access through VA’s systems</h3> | ||
<p className="appoint-text"> | ||
This accredited {getRepType(formData['view:selectedRepresentative'])}{' '} | ||
may work with their team to help you file a claim or request a decision | ||
review. Some of their team members may need to access your records | ||
through VA’s information technology systems. | ||
</p> | ||
</> | ||
); | ||
}; | ||
|
||
InsideVAAuthorizationDescription.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
export { InsideVAAuthorizationDescription }; |
28 changes: 28 additions & 0 deletions
28
src/applications/representative-appoint/components/MedicalAuthorizationDescription.jsx
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,28 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { getRepType } from '../utilities/helpers'; | ||
|
||
const MedicalAuthorizationDescription = ({ formData }) => { | ||
return ( | ||
<> | ||
<h3>Authorization to access certain medical records</h3> | ||
<p className="appoint-text"> | ||
This accredited {getRepType(formData['view:selectedRepresentative'])}{' '} | ||
may need to access certain medical records to help you. You can | ||
authorize them to access all or some of these types of records: | ||
</p> | ||
<ul className="appoint-text"> | ||
<li>Alcoholism and alcohol abuse records</li> | ||
<li>Drug abuse records</li> | ||
<li>HIV (human immunodeficiency virus) records</li> | ||
<li>Sickle cell anemia records</li> | ||
</ul> | ||
</> | ||
); | ||
}; | ||
|
||
MedicalAuthorizationDescription.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
export { MedicalAuthorizationDescription }; |
62 changes: 62 additions & 0 deletions
62
src/applications/representative-appoint/components/MedicalAuthorizationPolicy.jsx
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,62 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import { getFormNumber } from '../utilities/helpers'; | ||
|
||
const MedicalAuthorizationPolicy = props => { | ||
const { formData } = props; | ||
|
||
return ( | ||
<div className="vads-u-margin-y--3"> | ||
<va-accordion uswds bordered open-single> | ||
<va-accordion-item bordered header="Our records authorization policy"> | ||
{getFormNumber(formData) === '21-22' ? ( | ||
<p data-testid="medical-authorization-policy-2122"> | ||
<strong>I authorize</strong> the VA facility having custody of my | ||
VA claimant records to disclose to the service organization named | ||
in Item 15 all treatment records relating to drug abuse, | ||
alcoholism or alcohol abuse, infection with the human | ||
immunodeficiency virus (HIV), or sickle cell anemia. Redisclosure | ||
of these records by my service organization representative, other | ||
than to VA or the Court of Appeals for Veterans Claims, is not | ||
authorized without my further written consent. This authorization | ||
will remain in effect until the earlier of the following events: | ||
(1) I revoke this authorization by filing a written revocation | ||
with VA; or (2) I revoke the appointment of the service | ||
organization named in Item 15, by explicit revocation or the | ||
appointment of another representative. | ||
</p> | ||
) : ( | ||
<p data-testid="medical-authorization-policy-2122a"> | ||
<strong>I authorize</strong> the VA facility having custody of my | ||
VA claimant records to disclose to the individual named in Item | ||
16A, and the firm/organization/individual(s) named in Item 19 (if | ||
approved by VA for affiliated access) all treatment records | ||
relating to drug abuse, alcoholism or alcohol abuse, infection | ||
with the human immunodeficiency virus (HIV), or sickle cell | ||
anemia. Redisclosure of further written consent. This | ||
authorization will remain in effect until the earlier of the | ||
following events: (1) I revoke this authorization by filing a | ||
written revocation with VA; or (2) I revoke the appointment of the | ||
individual named in Item 16A, either by explicit revocation or the | ||
appointment of another representative. representative. | ||
</p> | ||
)} | ||
</va-accordion-item> | ||
</va-accordion> | ||
</div> | ||
); | ||
}; | ||
|
||
MedicalAuthorizationPolicy.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
const mapStateToProps = state => ({ | ||
formData: state.form?.data || {}, | ||
}); | ||
|
||
export default connect( | ||
mapStateToProps, | ||
null, | ||
)(MedicalAuthorizationPolicy); |
22 changes: 22 additions & 0 deletions
22
src/applications/representative-appoint/components/MedicalSelectAuthorizationDescription.jsx
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,22 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { getRepType } from '../utilities/helpers'; | ||
|
||
const MedicalSelectAuthorizationDescription = ({ formData }) => { | ||
return ( | ||
<> | ||
<h3>Authorization to access certain medical records</h3> | ||
<p className="vads-u-margin-bottom--3 appoint-text"> | ||
You’ve authorized this accredited{' '} | ||
{getRepType(formData['view:selectedRepresentative'])} to access some of | ||
your medical records. | ||
</p> | ||
</> | ||
); | ||
}; | ||
|
||
MedicalSelectAuthorizationDescription.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
export { MedicalSelectAuthorizationDescription }; |
23 changes: 23 additions & 0 deletions
23
src/applications/representative-appoint/components/OutsideVAAuthorizationDescription.jsx
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,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { getRepType } from '../utilities/helpers'; | ||
|
||
const OutsideVAAuthorizationDescription = ({ formData }) => { | ||
return ( | ||
<> | ||
<h3>Authorization for access outside of VA’s systems</h3> | ||
<p className="appoint-text"> | ||
This accredited {getRepType(formData['view:selectedRepresentative'])}{' '} | ||
may work with their team to help you file a claim or request a decision | ||
review. Some of their team members may need to access your records | ||
outside of VA’s information technology systems. | ||
</p> | ||
</> | ||
); | ||
}; | ||
|
||
OutsideVAAuthorizationDescription.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
export { OutsideVAAuthorizationDescription }; |
23 changes: 23 additions & 0 deletions
23
src/applications/representative-appoint/components/OutsideVAAuthorizationNameDescription.jsx
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,23 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { getRepType } from '../utilities/helpers'; | ||
|
||
const OutsideVAAuthorizationNameDescription = ({ formData }) => { | ||
return ( | ||
<> | ||
<h3>Authorization for access outside of VA’s systems</h3> | ||
<p className="appoint-text"> | ||
You’ve authorized this accredited{' '} | ||
{getRepType(formData['view:selectedRepresentative'])} | ||
’s team to access your records outside of VA’s information technology | ||
systems. | ||
</p> | ||
</> | ||
); | ||
}; | ||
|
||
OutsideVAAuthorizationNameDescription.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
export { OutsideVAAuthorizationNameDescription }; |
31 changes: 31 additions & 0 deletions
31
src/applications/representative-appoint/components/OutsideVAAuthorizationUnsureNote.jsx
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,31 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { connect } from 'react-redux'; | ||
import { getRepType } from '../utilities/helpers'; | ||
|
||
const OutsideVAAuthorizationUnsureNote = props => { | ||
const { formData } = props; | ||
|
||
return ( | ||
<> | ||
<p className="appoint-text"> | ||
<strong>Note:</strong> If you’re not sure who to enter, ask the | ||
accredited {getRepType(formData['view:selectedRepresentative'])} you’re | ||
appointing.{' '} | ||
</p> | ||
</> | ||
); | ||
}; | ||
|
||
OutsideVAAuthorizationUnsureNote.propTypes = { | ||
formData: PropTypes.object, | ||
}; | ||
|
||
const mapStateToProps = state => ({ | ||
formData: state.form?.data || {}, | ||
}); | ||
|
||
export default connect( | ||
mapStateToProps, | ||
null, | ||
)(OutsideVAAuthorizationUnsureNote); |
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
Oops, something went wrong.