Skip to content

Conversation

@ardelato
Copy link
Collaborator

@ardelato ardelato commented Jul 9, 2025

Description

This adds a new admin page that will allow administrators to manage multiple groups at once. Allowing Approving/Un-approving, Archiving/Un-archiving, and Deleting.

In addition, this also adds the ability to import and exports groups as CSVs. Thus allowing us to easily seed a database/instance while giving us an easier interface to modify these newly imported groups

Screenshots

image
image
image

CR Notes

This will really only be used by the admins and only on occasion. There are probably better ways to organize the files and code but we are just looking for a functional interface.

QA Notes

We will need to validate the following functionality in the test cluster instance:

  • Only admins can access the /admins/groups page and API
  • We can interact and modify a group on a per-row bases
  • We can interact and modify multiple groups at once
  • We can import a CSV file of groups to seed the database
  • We can export a CSV file of current groups

ardelato added 9 commits July 8, 2025 11:02
- Introduced GroupsController for managing groups via API.
- Added AdminMiddleware to restrict access to admin routes.
- Created GroupsManagement Vue component for the admin interface.
- Updated AdminController to include a route for groups management.
- Added corresponding Blade view for groups management.
- Updated navigation to include a link to Groups Management.

All this is boilerplate and we will be adding more functionality to it.
That said, we needed to wrap the web route with the AdminMiddleware as
any regular user could access /stats and /admin/groups.
- Enhanced GroupsController to support sorting by various fields.
- Added GroupsTable component for displaying groups with pagination and sorting.
- Integrated API call for fetching groups in GroupsManagement component.

The group actions are not implemented yet, but the table view is working.
- Added performAction method in GroupsController to handle group actions
  such as approve, unapprove, archive, unarchive, and delete.
- Introduced ConfirmationModal component for user confirmation before
  performing actions on groups.
- Updated GroupsManagement component to integrate the confirmation modal
  and handle group actions.
- Enhanced GroupsTable component to trigger actions via the modal.
- Added API routes for performing a group action.

This update provides a complete flow for managing group actions in the admin
interface.
- Refactored GroupsController to include performBulkActions method for handling
  bulk operations on groups.
- Updated performAction method to accept a Group object for better reusability.
- Enhanced GroupsManagement component to support bulk actions via a new
  GroupsBulkAction component.
- Integrated error handling in ConfirmationModal for better user feedback.
- Updated API routes to accommodate bulk action requests.

This allows us to modify multiple groups at once.
- Added importGroups method in GroupsController to handle CSV file uploads
  and create groups in bulk.
- Introduced GroupsCsvUploadModal component for user interface to upload
  CSV files.
- Implemented error handling and validation for CSV file format and required
  fields.
- Enhanced GroupsManagement component to include the CSV upload modal and
  display import results.
- Created ImportResultsModal component to show success and error messages
  after import attempts.
… selection

- Updated GroupsManagement component to include page size selection for group listings.
- Enhanced GroupsTable component to display pagination information and allow page size changes.
- Added computed properties to manage pagination state and improve user experience.
- Implemented methods to handle page size changes and update the displayed groups accordingly.
- Implemented a floating scroll-to-top button that appears when the user scrolls
  down more than 300px.
- Added methods to handle the visibility of the button and smooth scrolling to the
  top of the page.
- Updated styles for the button to enhance user experience and visibility.
- Added exportGroups method in GroupsController to handle exporting groups
  as a CSV file.
- Implemented filtering options for search, status, archived, network, and
  country in the export process.
- Created generateCsvContent method to format group data into CSV format.
- Updated API routes to include the new export endpoint for groups.
- Enhanced GroupsManagement component to include an export button and handle
  the CSV download process.
- Implemented a search bar in the GroupsManagement component to filter groups
  by name, location, postcode, or area.
- Enhanced GroupsController to handle search queries and apply filters to the
  group retrieval process.
- Added debounce functionality to optimize API calls during search input.
- Included visual feedback for search results and a clear search option.
@ardelato
Copy link
Collaborator Author

QA 👍

I confirmed all checkboxes in the Test cluster instance, especially the permissions check

SnagitHelper2023 2025-07-14 14 46 20

Copy link
Member

@mlahargou mlahargou left a comment

Choose a reason for hiding this comment

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

CR 📱 Seems sane.

@ardelato ardelato merged commit 639b99c into hermes Jul 16, 2025
@ardelato ardelato deleted the feat--group-management-page branch July 16, 2025 17:42
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.

3 participants