Migrate user/all admin page to Vue + /api/v2/users (Group 2.1)#866
Open
edwh wants to merge 4 commits into
Open
Migrate user/all admin page to Vue + /api/v2/users (Group 2.1)#866edwh wants to merge 4 commits into
edwh wants to merge 4 commits into
Conversation
First sub-task of the Group 2 (user management) blade-to-vue migration. Introduces: - GET /api/v2/users (admin only, paginated, filters: name/email/location/country/role; sort by name/email/role/location/country/created_at/updated_at) - App\Http\Resources\UserAdmin - tests/Feature/Users/APIv2UsersTest covering auth (401), forbidden (403), pagination shape, name/email/role filters, asc sort. OpenAPI annotations included per plan convention. Vue page lands in a follow-up commit.
Replaces the legacy blade table/search form with a Vue SPA that consumes
GET /api/v2/users for filtering, sorting and pagination.
- resources/js/components/UsersPage.vue: filter form (name/email/location
/country/role), sortable b-table, b-pagination, debounced via submit
- resources/views/user/all.blade.php: now just mounts <UsersPage>
- lang/{en,fr,fr-BE}/users.php: i18n keys for the page
- app.js: register userspage component
- tests/Feature/Admin/Users/ViewUsersTest, UserAdminTest: rewritten as
smoke tests (admin reaches page, non-admin redirected). The detailed
filter/sort behaviour moves to APIv2UsersTest (covered) and Playwright
(follow-up commit).
The old user/all blade allowed sorting by last login (users.updated_at). The migrated Vue column lacked sortable, and its key (last_login_at) didn't match the API sortMap. Add sortable + sortKey: 'updated_at'. Found by adversarial review of PR #866.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Summary
Test plan