функция переключения на графы по нажатию на кнопку ветвление(исправлено)
This commit is contained in:
parent
be79f2fc21
commit
9ee2786956
@ -45,16 +45,18 @@ export default function ButtonsOptions({
|
|||||||
|
|
||||||
const handleClickBranching = (_, value) => {
|
const handleClickBranching = (_, value) => {
|
||||||
const parentId = question.content.rule.parentId
|
const parentId = question.content.rule.parentId
|
||||||
console.log(parentId)
|
console.log(parentId.length)
|
||||||
if (parentId.length !== 0) {
|
if (parentId.length === 0 ){
|
||||||
setTimeout(() => updateOpenBranchingPanel(!value), 10)
|
|
||||||
} else {
|
|
||||||
return enqueueSnackbar("Вопрос не учавствует в ветвлении")
|
return enqueueSnackbar("Вопрос не учавствует в ветвлении")
|
||||||
}
|
}
|
||||||
|
if (parentId === "root") {
|
||||||
if (parentId === "root")
|
|
||||||
return enqueueSnackbar("У корня нет условий ветвления")
|
return enqueueSnackbar("У корня нет условий ветвления")
|
||||||
}
|
}
|
||||||
|
if (parentId.length !== 0) {
|
||||||
|
setTimeout(() => updateOpenBranchingPanel(!value), 10)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const buttonSetting: {
|
const buttonSetting: {
|
||||||
icon: JSX.Element;
|
icon: JSX.Element;
|
||||||
|
|||||||
@ -55,16 +55,18 @@ export default function ButtonsOptionsAndPict({
|
|||||||
|
|
||||||
const handleClickBranching = (_, value) => {
|
const handleClickBranching = (_, value) => {
|
||||||
const parentId = question.content.rule.parentId
|
const parentId = question.content.rule.parentId
|
||||||
console.log(parentId)
|
console.log(parentId.length)
|
||||||
if (parentId.length !== 0) {
|
if (parentId.length === 0 ) {
|
||||||
setTimeout(() => updateOpenBranchingPanel(!value), 10)
|
|
||||||
} else {
|
|
||||||
return enqueueSnackbar("Вопрос не учавствует в ветвлении")
|
return enqueueSnackbar("Вопрос не учавствует в ветвлении")
|
||||||
}
|
}
|
||||||
|
if (parentId === "root") {
|
||||||
if (parentId === "root")
|
|
||||||
return enqueueSnackbar("У корня нет условий ветвления")
|
return enqueueSnackbar("У корня нет условий ветвления")
|
||||||
}
|
}
|
||||||
|
if (parentId.length !== 0) {
|
||||||
|
setTimeout(() => updateOpenBranchingPanel(!value), 10)
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Box
|
<Box
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user