VRMS icon indicating copy to clipboard operation
VRMS copied to clipboard

Create user search query hook

Open JackHaeg opened this issue 4 months ago • 0 comments

Overview

Currently, when a user uses, "User Search" or "User Permission Search" features on VRMS and navigates to a specific user's profile, and clicks "Back to search", their search query is no longer stored. This issue focuses on the first step of implementing a search query hook that will allow us to preserve the user's previous search when navigating "Back to search."

Action Items

  • [x] Requirement: The functionality to search for and store queries will be handled by the hook, so that the component that renders the items will no longer have that logic (we are moving the logic of the search component into a hook).
  • [x] Explore how to make a hook.
  • [x] Move the query functionality into the hook.
  • [x] Import the hook into the component.
  • [x] Replace the search with the functionality created by the hook:
    • [x] Stored state
    • [x] Query refresh logic
    • [x] Search mode (User Search or User Permission Search)
    • [x] Query filter string (the actual search text entered by the user)
    • [x] Query filter type (for User Search = Results by Name or Results by Email, and for User Permission Search = Admins or Project Members)

Resources/Instructions

JackHaeg avatar Sep 15 '25 21:09 JackHaeg