Skip to content

feat(users): Profile tab, dialog shell & list CRUD wiring (#36717) - #36990

Open
AP2300 wants to merge 1 commit into
mainfrom
issue-36717-users-portlet-profile-tab
Open

feat(users): Profile tab, dialog shell & list CRUD wiring (#36717)#36990
AP2300 wants to merge 1 commit into
mainfrom
issue-36717-users-portlet-profile-tab

Conversation

@AP2300

@AP2300 AP2300 commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Closes #36717

Summary

  • Ships the Users portlet Create/Edit dialog shell (4-tab strip, header, footer) with the Profile tab fully wired against the backend and inline "Coming soon" placeholders for the Roles, Permissions, and API Tokens tabs (delivered by sibling issues Users portlet: Roles tab (dual-list) #36718, Users portlet: Permissions tab (iframe embed) #36719, Users portlet: API Tokens tab #36720)
  • Adds the missing user CRUD to the list flow: GET /api/v1/users/{userId} hydrates the edit dialog, POST /api/v1/users creates, PUT /api/v1/users updates (roles field intentionally omitted so backend preserves membership — see UserResource#processRoles)
  • Delete flow — both from the dialog footer and the list bulk toolbar — now includes a required replacement-user picker (server-backed autocomplete over /api/v1/users/filter, excludes the users being deleted). Previously deletes silently reassigned ownership to the logged-in admin.
  • Fixes /users routing so the beta portlet actually lands on this UI instead of bouncing to Getting Started (PORTLET_ID_RESOLVERS.usersusers-beta).

Notable non-obvious calls

  • Access section is display-only in this PR: CMS Admin, Back-end, Front-end, Can Login map to backend roles (not UserForm fields), and safely editing them requires knowing the user's full role list. That's a follow-up (DWR wrapper vs. small REST endpoint decision).
  • Password stays optional on update. Empty password field means "keep current" — matches how UserForm handles password already; no client-side hack needed.
  • Show Getting Started toggle has no backend field; kept in the UI as informational, not persisted. To be revisited if the value is needed elsewhere.

Test plan

  • Create user via the "New" button — required fields validated, password ≥ 6 chars, confirm-match enforced; on Save a new row appears in the list
  • Edit user via row click — dialog hydrates from list-item data instantly, then background-fetches additionalInfo (prefix/suffix/title/company/website); on Save, changes persist and the list reloads
  • Toggle Active on/off via the Profile field — persists on save
  • Delete user via the dialog footer — replacement picker required, cannot pick the same user; typed-email confirmation required; on confirm, list reloads
  • Bulk-delete N users from the toolbar — replacement picker required, cannot pick any of the selected; on confirm, list reloads
  • Placeholder tabs render "Coming soon" and don't interfere with Profile Save
  • pnpm nx test portlets-dot-users-portlet — 56 passing
  • pnpm nx test data-access --testPathPatterns=dot-router — 46 passing
  • pnpm nx lint portlets-dot-users-portlet — clean

Follow-ups (each on its own branch/PR already prepared)

🤖 Generated with Claude Code

Ships the Users portlet Create/Edit dialog shell with the Profile tab
fully wired and placeholders for the three sibling tabs (delivered by
#36718, #36719, #36720).

Dialog / Profile tab:
- 4-tab strip with Profile as the only functional tab; Roles,
  Permissions, and API Tokens render "Coming soon" placeholders
- Header with avatar + name + Active status chip
- Account section: first/last name, email, password + confirm, Active
- Additional Info section: prefix/suffix/title/company/website
- Access section: disabled (values informational only), shows admin /
  backend / frontend / hasConsoleAccess pulled from the loaded user
- Delete User section (edit mode) with required replacement-user
  picker and email-typed confirmation

List CRUD:
- DotUsersService gains getUser/createUser/updateUser using
  POST/PUT/GET /api/v1/users; roles field intentionally omitted on
  update so backend preserves role membership (see
  UserResource#processRoles)
- DotUsersListStore gains createUser / updateUser / deleteSingleUser
- Bulk delete on the list toolbar now shows the same replacement
  picker instead of the old p-confirmDialog
- /users route now resolves to the new users-beta portlet id

Shared:
- DotUsersReplacementPickerComponent — server-backed autocomplete
  used by both delete flows; excludes the users being deleted from
  suggestions client-side

Test coverage: 56 tests in the portlet + 46 in data-access all pass.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@github-actions github-actions Bot added the Area : Frontend PR changes Angular/TypeScript frontend code label Aug 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area : Frontend PR changes Angular/TypeScript frontend code

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

Users portlet: Profile tab (Create and Edit dialog)

1 participant