Skip to content

SCC-3360: Back from holds situation #541

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

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

7emansell
Copy link
Collaborator

@7emansell 7emansell commented Jun 27, 2025

Ticket:

This PR does the following:

  • Adds a session storage key from the hold confirmation page
  • If user goes back from the hold confirmation to the hold request form
    • Page checks session storage key on mount
    • Warning banner displays ("You've already requested this item")
    • Request form disabled
  • If user goes back from the hold confirmation to the EDD request form
    • Page checks session storage key on mount
    • Warning banner displays ("You've already requested a scan of this item")
    • Still allows you to redo the request assuming you might want different options for the scan

How has this been tested?

Make a hold or EDD request, then go back

Accessibility concerns or updates

Checklist:

  • I updated the CHANGELOG with the appropriate information and JIRA ticket number (if applicable).
  • I have added relevant accessibility documentation for this pull request.
  • All new and existing tests passed.

Copy link

vercel bot commented Jun 27, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
research-catalog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 27, 2025 6:34pm

const bannerFlag = sessionStorage.getItem("holdCompleted")
if (bannerFlag === "true") {
setHoldCompleted(true)
sessionStorage.removeItem("holdCompleted")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Confirmed that this should only appear when the user has just come from back button so it's okay to delete this key once it's "used"– the banner doesn't need to appear if the user returns to this request page from the search results, for example

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

and same for on site hold

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant