new hard model amo

This commit is contained in:
Nastya 2024-06-11 22:52:20 +03:00
parent f516897dad
commit 179be13488

@ -107,9 +107,9 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
}
if (settingsResponse) {
console.log(settingsResponse);
setFirstRules(false);
setFirstRules(false);
}
};
fetchAccount();
@ -130,12 +130,30 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
PipelineID: selectedPipeline,
StepID: selectedStep,
Fieldsrule: {
...questionEntity
Lead: [
{
QuestionID: {
"44300": 0,
}
}
],
Company: [
{
QuestionID: {
}
}
],
Customer: [
{
QuestionID: {
}
}
]
},
TagsToAdd: {
...tags
}
})
})
if (quizID === undefined) return
if (selectedPipeline?.toString().length === 0) return enqueueSnackbar("Выберите воронку")
if (selectedPipeline?.toString().length === 0) return enqueueSnackbar("Выберите этап воронки")
@ -146,7 +164,26 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
PipelineID: Number(selectedPipeline),
StepID: Number(selectedStep),
Fieldsrule: {
...questionEntity
Lead: [
{
QuestionID: {
"44300": 0,
}
}
],
Company: [
{
QuestionID: {
}
}
],
Customer: [
{
QuestionID: {
}
}
]
},
TagsToAdd: {
...tags
@ -155,12 +192,12 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
} else {
const body = {
Fieldsrule: {
...questionEntity
},
TagsToAdd: {
...tags
}
Fieldsrule: {
...questionEntity
},
TagsToAdd: {
...tags
}
};
if (selectedDealPerformer?.toString() > 0) body.PerformerID = Number(selectedDealPerformer)
if (selectedPipeline?.toString() > 0) body.PipelineID = Number(selectedPipeline)