diff --git a/app/components/LeftPaneEntries/AssistItem/index.tsx b/app/components/LeftPaneEntries/AssistItem/index.tsx index edb75a301..743581943 100644 --- a/app/components/LeftPaneEntries/AssistItem/index.tsx +++ b/app/components/LeftPaneEntries/AssistItem/index.tsx @@ -42,6 +42,10 @@ import { ModelTagsType, Matrix1dValue, Matrix2dValue, + SingleSelectValue, + MultiSelectValue, + ScaleValue, + OrganigramValue, } from '#types/newAnalyticalFramework'; import AssistPopup from './AssistPopup'; @@ -52,6 +56,10 @@ import { isValidObject, createMatrix1dAttrFromTags, createMatrix2dAttrFromTags, + createSingleSelectAttrFromTags, + createMultiSelectAttrFromTags, + createScaleAttrFromTags, + createOrganigramAttrFromTags, } from './utils'; import styles from './styles.css'; @@ -262,6 +270,30 @@ function AssistItem(props: Props) { widget, ); } + if (widget.widgetId === 'MULTISELECT') { + return createMultiSelectAttrFromTags( + recommendedTags[widget.key] as MultiSelectValue, + widget, + ); + } + if (widget.widgetId === 'SELECT') { + return createSingleSelectAttrFromTags( + recommendedTags[widget.key] as unknown as SingleSelectValue, + widget, + ); + } + if (widget.widgetId === 'SCALE') { + return createScaleAttrFromTags( + recommendedTags[widget.key] as unknown as ScaleValue, + widget, + ); + } + if (widget.widgetId === 'ORGANIGRAM') { + return createOrganigramAttrFromTags( + recommendedTags[widget.key] as OrganigramValue, + widget, + ); + } return undefined; }).filter(isDefined); diff --git a/app/components/LeftPaneEntries/AutoEntriesModal/index.tsx b/app/components/LeftPaneEntries/AutoEntriesModal/index.tsx index 8e07b1312..f28c5a2fe 100644 --- a/app/components/LeftPaneEntries/AutoEntriesModal/index.tsx +++ b/app/components/LeftPaneEntries/AutoEntriesModal/index.tsx @@ -53,6 +53,10 @@ import { ModelTagsType, Matrix1dValue, Matrix2dValue, + SingleSelectValue, + MultiSelectValue, + ScaleValue, + OrganigramValue, } from '#types/newAnalyticalFramework'; import AssistPopup from '../AssistItem/AssistPopup'; import { createDefaultAttributes } from '../utils'; @@ -60,6 +64,10 @@ import { isValidObject, createMatrix1dAttrFromTags, createMatrix2dAttrFromTags, + createSingleSelectAttrFromTags, + createMultiSelectAttrFromTags, + createScaleAttrFromTags, + createOrganigramAttrFromTags, } from '../AssistItem/utils'; import styles from './styles.css'; @@ -393,6 +401,30 @@ function AutoEntriesModal(props: Props) { widget, ); } + if (widget.widgetId === 'MULTISELECT') { + return createMultiSelectAttrFromTags( + recommendedTags[widget.key] as MultiSelectValue, + widget, + ); + } + if (widget.widgetId === 'SELECT') { + return createSingleSelectAttrFromTags( + recommendedTags[widget.key] as unknown as SingleSelectValue, + widget, + ); + } + if (widget.widgetId === 'SCALE') { + return createScaleAttrFromTags( + recommendedTags[widget.key] as unknown as ScaleValue, + widget, + ); + } + if (widget.widgetId === 'ORGANIGRAM') { + return createOrganigramAttrFromTags( + recommendedTags[widget.key] as OrganigramValue, + widget, + ); + } return undefined; }).filter(isDefined);