diff --git a/webapp/src/components/Inputs/InputEntities.tsx b/webapp/src/components/Inputs/InputEntities.tsx index 903ddcf..a71ac61 100644 --- a/webapp/src/components/Inputs/InputEntities.tsx +++ b/webapp/src/components/Inputs/InputEntities.tsx @@ -52,11 +52,7 @@ export const InputEntity: FC = (props) => { options={options} getID={entities.getID} getLabel={entities.getLabel} - groupBy={(opt) => - typeof opt !== "string" - ? `${prettyName(opt.integration)}/ ${prettyName(opt.domain)}` - : "" - } + groupBy={(opt) => (typeof opt !== "string" ? prettyName(opt.domain) : "")} /> ); }; diff --git a/webapp/src/components/ServiceEditor/ServiceEditorTarget.tsx b/webapp/src/components/ServiceEditor/ServiceEditorTarget.tsx index 98c6421..214c7d8 100644 --- a/webapp/src/components/ServiceEditor/ServiceEditorTarget.tsx +++ b/webapp/src/components/ServiceEditor/ServiceEditorTarget.tsx @@ -24,11 +24,15 @@ export type ServiceEditorTargetProps = { export const ServiceEditorTarget: FC = (props) => { const value = cleanUpValue(props.value ?? {}); const domainRestrictions: string[] = []; + const integrationRestrictions: string[] = []; if (props.defn.entity) { if (typeof props.defn.entity.domain === "string") { domainRestrictions.push(props.defn.entity.domain); } + if (typeof props.defn.entity.integration === "string") { + integrationRestrictions.push(props.defn.entity.integration); + } } return ( @@ -42,7 +46,14 @@ export const ServiceEditorTarget: FC = (props) => { entity_id, }) } - restrictToDomain={domainRestrictions} + restrictToDomain={ + domainRestrictions.length === 0 ? undefined : domainRestrictions + } + restrictedIntegrations={ + integrationRestrictions.length === 0 + ? undefined + : integrationRestrictions + } multiple />