From 4894319f4aaedabbd87d84431652fd802ad989b5 Mon Sep 17 00:00:00 2001 From: Jun Tao Luo Date: Fri, 4 Oct 2024 22:28:39 -0400 Subject: [PATCH] Update cancel request confirmation --- .../cancel/CancelPageLayoutRequest.jsx | 142 +++++++++--------- .../components/layout/CCRequestLayout.jsx | 2 +- .../components/layout/DetailPageLayout.jsx | 6 +- .../components/layout/VARequestLayout.jsx | 2 +- 4 files changed, 77 insertions(+), 75 deletions(-) diff --git a/src/applications/vaos/appointment-list/components/cancel/CancelPageLayoutRequest.jsx b/src/applications/vaos/appointment-list/components/cancel/CancelPageLayoutRequest.jsx index 83dbfc50204b..26c0a4374980 100644 --- a/src/applications/vaos/appointment-list/components/cancel/CancelPageLayoutRequest.jsx +++ b/src/applications/vaos/appointment-list/components/cancel/CancelPageLayoutRequest.jsx @@ -7,6 +7,8 @@ import FacilityPhone from '../../../components/FacilityPhone'; import VAFacilityLocation from '../../../components/VAFacilityLocation'; import { selectRequestedAppointmentDetails } from '../../redux/selectors'; import ListBestTimeToCall from '../ListBestTimeToCall'; +import { Details, Section } from '../../../components/layout/DetailPageLayout'; +import { APPOINTMENT_STATUS } from '../../../utils/constants'; export default function CancelPageLayoutRequest() { const { id } = useParams(); @@ -22,8 +24,10 @@ export default function CancelPageLayoutRequest() { preferredLanguage, preferredTimesForPhoneCall, provider: preferredProvider, + providerAddress, typeOfCareName, preferredModality, + status, } = useSelector( state => selectRequestedAppointmentDetails(state, id), shallowEqual, @@ -33,90 +37,88 @@ export default function CancelPageLayoutRequest() { reason = null; otherDetails = bookingNotes; } + const { providerName, treatmentSpecialty } = preferredProvider || {}; return ( <>

{`Request for ${isCC ? 'community care appointment' : 'appointment'}`}

-

- Preferred date and time -

- -

- Type of care -

- {typeOfCareName} +
+ +
+
+ {typeOfCareName || 'Type of care not noted'} +
{isCC && ( <> -

- Scheduling facility -

- {facility?.name} -

- Preferred community care provider -

- {preferredProvider?.providerName || - 'Provider information not available'} -

- Language you’d prefer the provider speak -

- {preferredLanguage} +
+ {APPOINTMENT_STATUS.cancelled !== status && ( + + This facility will contact you if we need more information about + your request. +
+
+
+ )} + {facility?.name} +
+
+ {`${providerName || 'Provider name not available'}`} +
+ + {`${treatmentSpecialty || 'Treatment specialty not available'}`} + +
+ {providerAddress && {providerAddress.line[0]}} + {!providerAddress && Address not available} +
+
+
+ {preferredLanguage} +
)} {!isCC && ( <> -

- How you prefer to attend -

- {preferredModality} -

- Facility -

- -

- Phone -

- +
+ {preferredModality} +
+
+ +
+
+ +
)} - -

- Details you’d like to share with your provider -

- - Reason: {`${reason && reason !== 'none' ? reason : 'Not available'}`} - -
- - Other details: {`${otherDetails || 'Not available'}`} - -

- Your contact details -

- Email: - {email} -
- Phone number: - -
- {isCC && } +
+
+ Email: {email} +
+ Phone number: + +
+ {isCC && ( + + )} +
); } diff --git a/src/applications/vaos/components/layout/CCRequestLayout.jsx b/src/applications/vaos/components/layout/CCRequestLayout.jsx index 9c69f1b499dd..380fa6b52783 100644 --- a/src/applications/vaos/components/layout/CCRequestLayout.jsx +++ b/src/applications/vaos/components/layout/CCRequestLayout.jsx @@ -83,7 +83,7 @@ export default function CCRequestLayout({ data: appointment }) {
{preferredLanguage}
-
+
Email: {email}
diff --git a/src/applications/vaos/components/layout/DetailPageLayout.jsx b/src/applications/vaos/components/layout/DetailPageLayout.jsx index 9b2d1d77bd67..bc1bf843cb24 100644 --- a/src/applications/vaos/components/layout/DetailPageLayout.jsx +++ b/src/applications/vaos/components/layout/DetailPageLayout.jsx @@ -99,8 +99,8 @@ Prepare.propTypes = { children: PropTypes.node, }; -export function Details({ reason, otherDetails, isRequest, level = 2 }) { - const heading = isRequest +export function Details({ reason, otherDetails, request, level = 2 }) { + const heading = request ? 'Details you’d like to share with your provider' : 'Details you shared with your provider'; return ( @@ -116,10 +116,10 @@ export function Details({ reason, otherDetails, isRequest, level = 2 }) { ); } Details.propTypes = { - isRequest: PropTypes.bool, level: PropTypes.number, otherDetails: PropTypes.string, reason: PropTypes.string, + request: PropTypes.bool, }; export function ClinicOrFacilityPhone({ diff --git a/src/applications/vaos/components/layout/VARequestLayout.jsx b/src/applications/vaos/components/layout/VARequestLayout.jsx index 6a6411a70c2f..cff37a9bcfd0 100644 --- a/src/applications/vaos/components/layout/VARequestLayout.jsx +++ b/src/applications/vaos/components/layout/VARequestLayout.jsx @@ -75,7 +75,7 @@ export default function VARequestLayout({ data: appointment }) { {!facilityPhone && <>Not available}
-
+
Email: {email}