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

EASI-4589 Fix the requests table's status column sorting method #2772

Merged
merged 12 commits into from
Aug 21, 2024

Conversation

adamodd
Copy link
Contributor

@adamodd adamodd commented Aug 19, 2024

EASI-4589

Description

Table's status column needs to sort by status enums.

This also introduces utils/tableRequestStatusIndex.ts to maintain sort indexes.
Tables were initially made to leave status columns up to alphabetical sorting, if at all.

Bug originally found on the ITGOV table.

Before



After


Screen Shot 2024-08-19 at 12 41 07 PM

How to test this change

  • Check table instances on local dev seeded
    • Make sure that the request status columns follow the order of the original enums
    • As USR1 : Job None or EASI_P_USER
      • homepage my open requests (combo request type)
      • it gov tab my requests table
      • technical tab my requests table
    • EASI_TRB_ADMIN_D
      • homepage trb admin existing requests table
    • EASI_D_GOVTEAM
      • it gov admin homepage

PR Author Checklist

  • I have provided a detailed description of the changes in this PR.
  • I have provided clear instructions on how to test the changes in this PR.
  • I have updated tests or written new tests as appropriate in this PR.

PR Reviewer Guidelines

  • It's best to pull the branch locally and test it, rather than just looking at the code online!
  • When approving a PR, provide a reason why you're approving it
    • e.g. "Approving because I tested it locally and all functionality works as expected"
    • e.g. "Approving because the change is simple and matches the Figma design"
  • Don't be afraid to leave comments or ask questions, especially if you don't understand why something was done! (This is often a great time to suggest code comments or documentation updates)
  • Check that all code is adequately covered by tests - if it isn't feel free to suggest the addition of tests.

Shorten the lcid condition
@adamodd adamodd marked this pull request as ready for review August 20, 2024 23:19
@adamodd adamodd requested a review from a team as a code owner August 20, 2024 23:19
@adamodd adamodd requested review from aterstriep and removed request for a team August 20, 2024 23:19
samoddball
samoddball previously approved these changes Aug 20, 2024
@adamodd
Copy link
Contributor Author

adamodd commented Aug 21, 2024

Updated to cover all tables.

These are ready since the last review

  • homepage my open requests (combo request type)
  • it gov admin homepage EASI_D_GOVTEAM

Made some edits to this table's tableMap so that I could untangle the original trb request status. Eventually planning to phase out tableMap for a more streamlined approach with typing at a later time.

@adamodd adamodd marked this pull request as draft August 21, 2024 16:31
@adamodd adamodd marked this pull request as ready for review August 21, 2024 16:35
@adamodd adamodd merged commit f2256f4 into main Aug 21, 2024
12 of 13 checks passed
@adamodd adamodd deleted the EASI-4589/status_sort branch August 21, 2024 22:33
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.

2 participants