new hard model amo
This commit is contained in:
parent
f516897dad
commit
179be13488
@ -107,9 +107,9 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
|
|||||||
}
|
}
|
||||||
if (settingsResponse) {
|
if (settingsResponse) {
|
||||||
console.log(settingsResponse);
|
console.log(settingsResponse);
|
||||||
setFirstRules(false);
|
setFirstRules(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
fetchAccount();
|
fetchAccount();
|
||||||
@ -130,12 +130,30 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
|
|||||||
PipelineID: selectedPipeline,
|
PipelineID: selectedPipeline,
|
||||||
StepID: selectedStep,
|
StepID: selectedStep,
|
||||||
Fieldsrule: {
|
Fieldsrule: {
|
||||||
...questionEntity
|
Lead: [
|
||||||
|
{
|
||||||
|
QuestionID: {
|
||||||
|
"44300": 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
Company: [
|
||||||
|
{
|
||||||
|
QuestionID: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
Customer: [
|
||||||
|
{
|
||||||
|
QuestionID: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
TagsToAdd: {
|
TagsToAdd: {
|
||||||
...tags
|
...tags
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
if (quizID === undefined) return
|
if (quizID === undefined) return
|
||||||
if (selectedPipeline?.toString().length === 0) return enqueueSnackbar("Выберите воронку")
|
if (selectedPipeline?.toString().length === 0) return enqueueSnackbar("Выберите воронку")
|
||||||
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),
|
PipelineID: Number(selectedPipeline),
|
||||||
StepID: Number(selectedStep),
|
StepID: Number(selectedStep),
|
||||||
Fieldsrule: {
|
Fieldsrule: {
|
||||||
...questionEntity
|
Lead: [
|
||||||
|
{
|
||||||
|
QuestionID: {
|
||||||
|
"44300": 0,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
Company: [
|
||||||
|
{
|
||||||
|
QuestionID: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
],
|
||||||
|
Customer: [
|
||||||
|
{
|
||||||
|
QuestionID: {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
},
|
},
|
||||||
TagsToAdd: {
|
TagsToAdd: {
|
||||||
...tags
|
...tags
|
||||||
@ -155,12 +192,12 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
|
|||||||
} else {
|
} else {
|
||||||
const body = {
|
const body = {
|
||||||
|
|
||||||
Fieldsrule: {
|
Fieldsrule: {
|
||||||
...questionEntity
|
...questionEntity
|
||||||
},
|
},
|
||||||
TagsToAdd: {
|
TagsToAdd: {
|
||||||
...tags
|
...tags
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
if (selectedDealPerformer?.toString() > 0) body.PerformerID = Number(selectedDealPerformer)
|
if (selectedDealPerformer?.toString() > 0) body.PerformerID = Number(selectedDealPerformer)
|
||||||
if (selectedPipeline?.toString() > 0) body.PipelineID = Number(selectedPipeline)
|
if (selectedPipeline?.toString() > 0) body.PipelineID = Number(selectedPipeline)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user