-
Notifications
You must be signed in to change notification settings - Fork 125
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
ryanshaw
wants to merge
26
commits into
main
from
ryanshaw/55085-removes-appointment-list-use-of-va_online_scheduling_status_improvement-flag
Closed
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
07e368b
Fixes linting error
ryanshaw dd52cd7
Removes feature status improvement feature flag and conditionals from…
ryanshaw 775c41b
WIP: skip unit tests
ryanshaw bbb0a30
WIP: enable test
ryanshaw a32b101
WIP: disable test
ryanshaw 3645f01
WIP: test auto push
ryanshaw e0ef1d5
WIP: disable test
ryanshaw f0ada2a
Linting fixes
ryanshaw aeb51e9
Fixes linting
ryanshaw db8da91
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw db18888
Adds phone appointment to local mocks
ryanshaw 558b0f4
Removes status improvement flag conditional blocks from appointment list
ryanshaw 21ae339
Updates comments
ryanshaw 51351b7
WIP: skip tests
ryanshaw 48468ef
Removes unused unit test
ryanshaw 275b722
Updates unit test
ryanshaw 482041f
Updates unit tests
ryanshaw 51367fa
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw 8728218
Fixes linting errors
ryanshaw f7ef82c
Updates subPageTitle logic on appointments page
ryanshaw 53277a5
WIP: disable test
ryanshaw 3cfc2a7
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw 38b0146
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw 00e4219
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw 2b61e5f
Updates comment
ryanshaw 4614615
Merge branch 'main' of github.com:department-of-veterans-affairs/vets…
ryanshaw File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
There are no files selected for viewing
127 changes: 59 additions & 68 deletions
127
src/applications/vaos/appointment-list/components/AppointmentListNavigation.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 |
---|---|---|
@@ -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 | ||
} | ||
> | ||
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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 = { | ||
|
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.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ESLint disabled here