Skip to content

Asap 222 admin page tweaks - #304

Merged
lkacenja merged 7 commits into
devfrom
asap-222-admin-page-tweaks
Sep 17, 2025
Merged

Asap 222 admin page tweaks#304
lkacenja merged 7 commits into
devfrom
asap-222-admin-page-tweaks

Conversation

@lkacenja

@lkacenja lkacenja commented Sep 9, 2025

Copy link
Copy Markdown
Contributor

Soon we are going to add more users to the APP for SLC. We have a bunch of folks from Georgia in the system. We'd like to enhance the user management interface to make it easier to maintain accounts.

This PR introduces:

  • Pagination on the user page
  • An email filter
  • A few columns in the table like creation date and last sign in date
  • Ability for admins to resend invitation emails
  • Test coverage for the new features
  • What additional steps are required to test this branch locally?

To test pagination, go to config/initializers/kaminari.rb and set config.default_per_page to a lower value like 1 or 2. This makes testing pagination easier.

  • Are there any areas you would like extra review?

The new user UI pieces and potentially email resending on staging.

  • Are there any rake tasks to run on production?

No

@lkacenja lkacenja self-assigned this Sep 9, 2025
@lkacenja
lkacenja marked this pull request as ready for review September 9, 2025 15:32
expect(page).to have_content "Signed in successfully"
expect(page).to have_no_selector "#new_user"
end
# clear_emails

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

This test is unrelated. I must have forgotten to return it at some point in the past. 🤯

@lkacenja
lkacenja requested a review from 4dh September 10, 2025 18:51
@4dh

4dh commented Sep 15, 2025

Copy link
Copy Markdown
Screenshot 2025-09-15 at 5 55 00 PM Screenshot 2025-09-15 at 5 55 38 PM I am not seeing the pages numbers when changing pagination on the user management page- When set config.default_per_page = 1, I see one user, but no way to see second page. However, when I search for other user email, it does appear. The other image here is when set config.default_per_page = 2, with same user base. We now see 2 users (there are 3 though and not seeing how to get to pg 2).

I am using chrome browser

@lkacenja

lkacenja commented Sep 16, 2025

Copy link
Copy Markdown
Contributor Author

I am not seeing the pages numbers when changing pagination on the user management page- When set config.default_per_page = 1, I see one user, but no way to see second page. However, when I search for other user email, it does appear. The other image here is when set config.default_per_page = 2, with same user base. We now see 2 users (there are 3 though and not seeing how to get to pg 2). I am using chrome browser.

@4dh oof, I forgot that I hardcoded the pager not to show up with less than 25 items here. I did that so that the div with all the spacing and border would not appear all the time. This is a good catch. As of 26c66c2, I've changed that hardcoded value to read whatever is set in the Kaminari configuration. If you pull, I think (hope) the pager will show up now.

@4dh 4dh left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Screenshot 2025-09-17 at 3 08 50 PM Everything working well and pagination is now visible with page numbers (see screenshot). I tested out with making 3 dummy users and setting config.default_per_page to 1 and 2.

@lkacenja
lkacenja merged commit d9e5dd5 into dev Sep 17, 2025
2 checks passed
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