Roles
RolesAssignModal
Modal dialog for assigning one or more roles to a user in admin role management.
RolesAssignModal
Renders a modal with a searchable role checklist, showing the user's currently assigned roles pre-checked, and save/cancel controls to apply role changes.
Components
<XAdminRolesAssignModal />
Displays a modal for selecting roles to assign to a specific user, with current role pre-selection and bulk save.
<XAdminRolesAssignModal v-model:open="open" :userId="userId" />
Props
| Prop | Type | Default | Description |
|---|---|---|---|
open | boolean | false | Controls modal visibility (use v-model:open) |
userId | string | — | ID of the user to assign roles to |
endpoint | string | '/api/admin/roles' | Base API endpoint |
loading | boolean | false | Show loading skeleton inside modal |
searchable | boolean | true | Show search input for role filtering |
AI Context
component: XAdminRolesAssignModal
package: "@xenterprises/nuxt-x-app-admin"
category: Roles
use-when: Opening a modal to assign or change roles for a specific user in an admin panel
