Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

Add generic request sorting button #1320

Merged
merged 5 commits into from
Sep 15, 2022

Conversation

TheAndrewJackson
Copy link
Contributor

@TheAndrewJackson TheAndrewJackson commented Sep 14, 2022

Purpose

Add sorting button that can be used for other subject requests fields in the future.

Changes

  • Add sort button
  • Add sort_field and sort_direction to PrivacyRequestParams
SortingButton.mov

Checklist

  • Update CHANGELOG.md file
    • Merge in main so the most recent CHANGELOG.md file is being appended to
    • Add description within the Unreleased section in an appropriate category. Add a new category from the list at the top of the file if the needed one isn't already there.
    • Add a link to this PR at the end of the description with the PR number as the text. example: #1
  • Applicable documentation updated (guides, quickstart, postman collections, tutorial, fidesdemo, database diagram.
  • If docs updated (select one):
    • documentation complete, or draft/outline provided (tag docs-team to complete/review on this branch)
    • documentation issue created (tag docs-team to complete issue separately)
  • Good unit test/integration test coverage
  • This PR contains a DB migration. If checked, the reviewer should confirm with the author that the down_revision correctly references the previous migration before merging
  • The Run Unsafe PR Checks label has been applied, and checks have passed, if this PR touches any external services

Ticket

Fixes #1152

@TheAndrewJackson TheAndrewJackson changed the title Add generic request sort button Add generic request sorting button Sep 14, 2022
@TheAndrewJackson TheAndrewJackson marked this pull request as ready for review September 14, 2022 16:02
const handleButtonClick = useCallback(() => {
setWasButtonJustClicked(true);
dispatch(setSortField(sortField));
if (buttonState === ButtonState.UNSELECTED) {
Copy link
Contributor

Choose a reason for hiding this comment

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

A switch statement here will make this snippet easier to read.

Copy link
Contributor

@chriscalhoun1974 chriscalhoun1974 left a comment

Choose a reason for hiding this comment

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

Left some minor comments. Great work!

@chriscalhoun1974 chriscalhoun1974 self-assigned this Sep 14, 2022
@chriscalhoun1974 chriscalhoun1974 merged commit eadb960 into main Sep 15, 2022
@chriscalhoun1974 chriscalhoun1974 deleted the 1152_sort_days_left_dashboard branch September 15, 2022 01:07
sanders41 pushed a commit that referenced this pull request Sep 22, 2022
* Add generic request sort button

* Update changelog

* Implement PR feedback
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sort days_left column in the PrivacyRequest dashboard's table
2 participants