getLocationOptions

Function

Construct the dynamic location picker options with the entity's configured location using the following logic:

  1. If there is no entity (e.g. we're creating an entity), select the "custom" option by default
  2. Else if there is no location set on the entity, select the "none" option
  3. Else if the entity has a location and it's the same as the current option, select it and update the option with the entity's location

Parameters

Parameter Type Default Notes
id Required string
type Required string
location Required IHubLocation
portalName Required string
hubRequestOptions Required IHubRequestOptions

Returns

Promise<IHubLocationOption[]>

Function defined in common/src/core/schemas/internal/getLocationOptions.ts:19