fix tag name src/pages/IntegrationsPage/IntegrationsModal/Amo/Tags/AmoTags.tsx

This commit is contained in:
Nastya 2024-11-04 02:27:59 +03:00
parent ee4120d0bc
commit f914eb7b31
4 changed files with 17 additions and 5 deletions

@ -128,7 +128,7 @@ export default function ContainerWidgetSetup({ step, nextButton }: Props) {
maxWidth: "365px",
}}
>
Quiz будет открыть прямо в том месте, где вы установите код на сайте
Quiz будет открыт прямо в том месте, где вы установите код на сайте
</Typography>
</Box>
<Typography sx={{ maxWidth: "414px", fontSize: "14px", alignSelf: "start" }}>

@ -42,7 +42,7 @@ export const AmoQuestions: FC<Props> = ({
selectedCurrentFields,
questionsItems,
fieldsItems,
selectedQuestions,
selectedQuestions = [],
handleAddQuestion,
handlePrevStep,
handleNextStep,
@ -52,6 +52,18 @@ export const AmoQuestions: FC<Props> = ({
onScroll,
titleProps,
}) => {
if (!selectedQuestions.hasOwnProperty('Contact')) {
selectedQuestions.Contact = []
}
if (!selectedQuestions.hasOwnProperty('Customer')) {
selectedQuestions.Customer = []
}
if (!selectedQuestions.hasOwnProperty('Company')) {
selectedQuestions.Company = []
}
if (!selectedQuestions.hasOwnProperty('Lead')) {
selectedQuestions.Lead = []
}
const [isSelection, setIsSelection] = useState<boolean>(false);
const [activeScope, setActiveScope] = useState<QuestionKeys | null>(null);
const [selectedQuestion, setSelectedQuestion] = useState<string | null>(null);

@ -82,7 +82,7 @@ export const AmoTags: FC<Props> = ({
isError={sortedTagsItems.length === 0}
constrictor={startConstrictor}
/>
<ItemsSeactiveScopelectionView
<ItemsSelectionView
items={sortedTagsItems}
selectedItemId={selectedTag}
setSelectedItem={setSelectedTag}

@ -278,8 +278,8 @@ export const useAmoIntegration = ({ isModalOpen, isTryRemoveAccount, quizID, que
useEffect(() => {
if (isReadyGetFields) {
getFields({
page: pageOfTags,
size: SIZE,
page: pageOfFields,
size: 1000,
}).then(([response]) => {
if (response && response.items !== null) {
const minifiedTags: MinifiedData[] = [];