feat(admin-users): dedicated admin profile drawer with own tabs
The first pass had admin/users sharing the address book profile partial, which surfaced Contact/Address/Organization/About tabs that ignored the admin-specific context. Separates the admin quick-view so it mirrors the edit-page tab structure while staying read-only. - `UserProfileViewService::buildAdminProfile()` extends the base profile with `admin_extras` (active, email_verified_at, last_login_at, last_login_provider, created, modified). - `templates/partials/app-admin-user-profile.phtml` is the admin-only render path: Master data · Organization · Security · About. Status badge under the name; timestamps locale-formatted. - `pages/admin/users/view-fragment($id).php` / `(none).phtml` switched to the admin service method + partial. - Drawer CSS aligns the aside with the main section's inline padding so the content strip does not visually step in/out. Address book is unchanged — still uses `buildProfile()` + the base partial. Two i18n keys added (`Login provider`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -25,7 +25,7 @@ if (!$decision->isAllowed()) {
|
||||
return;
|
||||
}
|
||||
|
||||
$profile = app(UserProfileViewService::class)->buildProfile($currentUserId, $uuid);
|
||||
$profile = app(UserProfileViewService::class)->buildAdminProfile($currentUserId, $uuid);
|
||||
$status = (string) ($profile['status'] ?? '');
|
||||
if ($status === 'not_found' || $status === 'invalid_uuid') {
|
||||
http_response_code(404);
|
||||
|
||||
@@ -3,4 +3,4 @@ if (!isset($user) || !is_array($user)) {
|
||||
return;
|
||||
}
|
||||
$profileKey = 'admin-users-profile';
|
||||
require templatePath('partials/app-user-profile.phtml');
|
||||
require templatePath('partials/app-admin-user-profile.phtml');
|
||||
|
||||
Reference in New Issue
Block a user