Employer address list

Collects employer’s physical addresses. It supports adding and editing various types of addresses such as work locations, filing addresses, and primary business addresses.

Available as:
Employer address list

Employer Address List

Options

NameTypeDescription
userTokenStringRequired. A User Token with EMPLOYER_ADMIN access role for the specified Employer.
employerIdStringRequired. The id of the Employer.
displayModeStringConfigures the layout of the embedded experience. Options are: drawer, modal, and inline. Defaults to drawer if not provided.
titleStringOptional custom title to display in the layout.
closeDisabledBooleanApplicable to modal and drawer modes. Disables the close functionality. Consumers are responsible for handling the behavior triggered when the close event occurs. Defaults to false.
variantStringConfigures the experience variant. Use work-locations to show and manage only work locations, or allfor managing all types of locations. Defaults to all.

Refer to the reference on creating elements for the additional options that are available to all elements.

Embedded usage

Element name: employer-address-list

Refer to the guide on how to embed an Element with Salsa.js for more detailed instructions.

Example

salsa.elements.create('employer-address-list', {
  userToken: 'eyJhbGciO...ajs0Wqw', 
  employerId: 'er_e8343fc7-9d63-4cc5-81ed-c573fc666d37',
  displayMode: 'modal',
  title: 'My custom title',
  closeDisabled: true, 
  variant: 'work-locations'
});

Events

Refer to the documentation on Element events for more information about events and instructions on how to consume them.

complete event

The complete event is triggered when the user adds an address and save it.

Event object properties

NameTypeDescription
elementTypeStringemployer-address-list
employerIdStringThe id of Employer.
displayModeStringThe display mode used (drawer, modal or inline).

close event

The close event is triggered when the user completes cancels address list flow or closes the drawer/modal.

Event object properties

NameTypeDescription
elementTypeStringemployer-onboard-workers
employerIdStringThe id of Employer.
displayModeStringThe display mode used (drawer, modal or inline).