Skip to main content
Version: 13.x (Current)

ck-import-users-modal

The ck-import-users-modal web component is used to import and activate a set of users from a csv file. The operation is done by importing the users's by creating a job on the user-manager-service and waiting for its completion by polling the job status.

ck-import-users-modal

Usage

In order to open the ck-import-users-modal in a Microfrontend Composer, a configuration is needed to configure a button to emit the custom event import-users-modal-modal with payload {"open": true} . An example configuration follows:

{
"type": "element",
"tag": "bk-button",
"properties": {
"iconId": "UploadOutlined",
"content": "Import users"
},
"clickConfig": {
"type": "event",
"actionConfig": {
"label": "import-users-modal",
"payload": {
"open": true
}
}
}
},
{
"type": "element",
"url": "/mia-care-web-components/mia-care-web-components.esm.js",
"tag": "ck-import-users-modal"
}

After the submission of the data, the modal will show a progressbar indicating the completion percentage of the operation. When the operation completes. A feedback message will be shown indicating the result of the operation, or an error if the procedure failed.

Properties & Attributes

propertytyperequireddefaultdescription
userManagerServiceUrlstringfalse/umsPath the expose the UserManager Service. The path must not have the trailing slash.
widthstringfalse600pxThe width of the modal. It must a valid CSS value
heightstringfalseautoThe minimum height of the modal. It must a valid CSS value.
pollMaxRetriesnumberfalse5The maximum amount of retries the component will do while waiting for the job completion
pollIntervalPeriodnumberfalse1000The period that will occur between two subsequents api call while polling the status of the job
jobUpsertbooleanfalse-Add the upsert parameter to the job creation's API call. If set to false, it disables users update, allowing only the creation of new users

Listens to

eventactionemitson error
reset-password-modalTriggers the opening or the closing of the modal.--

Emits

eventdescription
reset-password-modalCustom event, the payload equals the current state of the modal (open and loading state, percentage completion, the operation result or error).