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

[55085] Removes appointment list use of va online scheduling status improvement flag #27685

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
07e368b
Fixes linting error
ryanshaw Jan 26, 2024
dd52cd7
Removes feature status improvement feature flag and conditionals from…
ryanshaw Jan 26, 2024
775c41b
WIP: skip unit tests
ryanshaw Jan 26, 2024
bbb0a30
WIP: enable test
ryanshaw Jan 26, 2024
a32b101
WIP: disable test
ryanshaw Jan 26, 2024
3645f01
WIP: test auto push
ryanshaw Jan 26, 2024
e0ef1d5
WIP: disable test
ryanshaw Jan 26, 2024
f0ada2a
Linting fixes
ryanshaw Jan 26, 2024
aeb51e9
Fixes linting
ryanshaw Jan 27, 2024
db8da91
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw Jan 29, 2024
db18888
Adds phone appointment to local mocks
ryanshaw Jan 29, 2024
558b0f4
Removes status improvement flag conditional blocks from appointment list
ryanshaw Jan 29, 2024
21ae339
Updates comments
ryanshaw Jan 29, 2024
51351b7
WIP: skip tests
ryanshaw Jan 29, 2024
48468ef
Removes unused unit test
ryanshaw Feb 5, 2024
275b722
Updates unit test
ryanshaw Feb 5, 2024
482041f
Updates unit tests
ryanshaw Feb 5, 2024
51367fa
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw Feb 5, 2024
8728218
Fixes linting errors
ryanshaw Feb 6, 2024
f7ef82c
Updates subPageTitle logic on appointments page
ryanshaw Feb 6, 2024
53277a5
WIP: disable test
ryanshaw Feb 6, 2024
3cfc2a7
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw Feb 7, 2024
38b0146
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw Feb 8, 2024
00e4219
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw Feb 11, 2024
2b61e5f
Updates comment
ryanshaw Feb 12, 2024
4614615
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw Feb 12, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,91 +1,82 @@
import React from 'react';
import { useLocation, NavLink } from 'react-router-dom';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import { recordEvent } from '@department-of-veterans-affairs/platform-monitoring/exports';
import classNames from 'classnames';
import { selectFeatureStatusImprovement } from '../../redux/selectors';
import { GA_PREFIX } from '../../utils/constants';
import PrintButton from './ConfirmedAppointmentDetailsPage/PrintButton';

export default function AppointmentListNavigation({ count, callback }) {
const location = useLocation();
const featureStatusImprovement = useSelector(state =>
selectFeatureStatusImprovement(state),
);

const isPending = location.pathname.endsWith('/pending');
const isPast = location.pathname.endsWith('/past');
const isUpcoming = location.pathname.endsWith('/');

if (featureStatusImprovement) {
return (
<div
className={classNames(
`vaos-hide-for-print vads-l-row xsmall-screen:vads-u-border-bottom--0
return (
<div
className={classNames(
`vaos-hide-for-print vads-l-row xsmall-screen:vads-u-border-bottom--0
vads-u-margin-bottom--3 small-screen:${
isPast ? 'vads-u-margin-bottom--3' : 'vads-u-margin-bottom--4'
} small-screen:vads-u-border-bottom--1px vads-u-color--gray-medium`,
)}
)}
>
<nav
aria-label="Appointment list navigation"
className="vaos-appts__breadcrumb vads-u-flex--1 vads-u-padding-top--0p5"
>
<nav
aria-label="Appointment list navigation"
className="vaos-appts__breadcrumb vads-u-flex--1 vads-u-padding-top--0p5"
>
<ul>
<li>
<NavLink
to="/"
onClick={() => callback(true)}
aria-current={
Boolean(isUpcoming).toString() // eslint-disable-next-line jsx-a11y/aria-proptypes
}
>
Upcoming
</NavLink>
</li>
<li>
<NavLink
to="/pending"
onClick={() => {
callback(true);
recordEvent({
event: `${GA_PREFIX}-status-pending-link-clicked`,
});
}}
aria-current={
Boolean(isPending).toString() // eslint-disable-next-line jsx-a11y/aria-proptypes
}
>
{`Pending (${count})`}
</NavLink>
</li>
<li>
<NavLink
to="/past"
onClick={() => {
callback(true);
recordEvent({
event: `${GA_PREFIX}-status-past-link-clicked`,
});
}}
aria-current={
Boolean(isPast).toString() // eslint-disable-next-line jsx-a11y/aria-proptypes
}
>
Past
</NavLink>
</li>
</ul>
</nav>{' '}
<div className="vads-u-margin-bottom--1">
<PrintButton className="vads-u-flex--auto " />
</div>
<ul>
<li>
<NavLink
to="/"
onClick={() => callback(true)}
aria-current={
Boolean(isUpcoming).toString() // eslint-disable-next-line jsx-a11y/aria-proptypes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint disabled here

}
>
Upcoming
</NavLink>
</li>
<li>
<NavLink
to="/pending"
onClick={() => {
callback(true);
recordEvent({
event: `${GA_PREFIX}-status-pending-link-clicked`,
});
}}
aria-current={
Boolean(isPending).toString() // eslint-disable-next-line jsx-a11y/aria-proptypes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint disabled here

}
>
{`Pending (${count})`}
</NavLink>
</li>
<li>
<NavLink
to="/past"
onClick={() => {
callback(true);
recordEvent({
event: `${GA_PREFIX}-status-past-link-clicked`,
});
}}
aria-current={
Boolean(isPast).toString() // eslint-disable-next-line jsx-a11y/aria-proptypes

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ESLint disabled here

}
>
Past
</NavLink>
</li>
</ul>
</nav>{' '}
<div className="vads-u-margin-bottom--1">
<PrintButton className="vads-u-flex--auto " />
</div>
);
}

return null;
</div>
);
}

AppointmentListNavigation.propTypes = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import React from 'react';
import { useHistory } from 'react-router-dom';
import moment from 'moment';
import { focusElement } from 'platform/utilities/ui';
import { focusElement } from '@department-of-veterans-affairs/platform-utilities/ui';
import { useSelector } from 'react-redux';
import PropTypes from 'prop-types';
import { sentenceCase } from '../../../utils/formatters';
import { getPreferredCommunityCareProviderName } from '../../../services/appointment';
import { APPOINTMENT_STATUS, SPACE_BAR } from '../../../utils/constants';
import {
selectFeatureStatusImprovement,
selectFeatureBreadcrumbUrlUpdate,
} from '../../../redux/selectors';
import { selectFeatureBreadcrumbUrlUpdate } from '../../../redux/selectors';

function handleClick({ history, link, idClickable }) {
return () => {
Expand Down Expand Up @@ -40,9 +37,6 @@ export default function RequestListItem({ appointment, facility }) {
'MMMM D, YYYY',
);
const idClickable = `id-${appointment.id?.replace('.', '\\.')}`;
const featureStatusImprovement = useSelector(state =>
selectFeatureStatusImprovement(state),
);

const featureBreadcrumbUrlUpdate = useSelector(state =>
selectFeatureBreadcrumbUrlUpdate(state),
Expand All @@ -67,13 +61,11 @@ export default function RequestListItem({ appointment, facility }) {
history,
link,
idClickable,
featureStatusImprovement,
})}
onKeyDown={handleKeyDown({
history,
link,
idClickable,
featureStatusImprovement,
})}
>
<div className="vads-u-flex--1 vads-u-margin-y--neg0p5">
Expand Down