кнопки ветвления показывают вопросы у дерева
This commit is contained in:
parent
a5897a38b7
commit
df55d8a9d3
@ -178,7 +178,7 @@ function CsComponent({
|
|||||||
{
|
{
|
||||||
data: {
|
data: {
|
||||||
id: targetQuestion.content.id,
|
id: targetQuestion.content.id,
|
||||||
label: targetQuestion.title || "noname"
|
label: targetQuestion.title === "" || targetQuestion.title === " " ? "noname" : targetQuestion.title
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@ -19,8 +19,8 @@ export const FirstNodeField = ({ setOpenedModalQuestions, modalQuestionTargetCon
|
|||||||
useLayoutEffect(() => {
|
useLayoutEffect(() => {
|
||||||
updateOpenedModalSettingsId()
|
updateOpenedModalSettingsId()
|
||||||
console.log("first render firstComponent")
|
console.log("first render firstComponent")
|
||||||
// updateRootContentId(quiz.id, "")
|
updateRootContentId(quiz.id, "")
|
||||||
// clearRuleForAll()
|
clearRuleForAll()
|
||||||
}, [])
|
}, [])
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -21,7 +21,7 @@ export const storeToNodes = (questions: AnyTypedQuizQuestion[]) => {
|
|||||||
if (question.content.rule.parentId) {
|
if (question.content.rule.parentId) {
|
||||||
nodes.push({data: {
|
nodes.push({data: {
|
||||||
id: question.content.id,
|
id: question.content.id,
|
||||||
label: question.title ? question.title : "noname"
|
label: question.title === "" || question.title === " " ? "noname" : question.title
|
||||||
}})
|
}})
|
||||||
// nodes.push({
|
// nodes.push({
|
||||||
// data: {
|
// data: {
|
||||||
|
|||||||
@ -44,10 +44,10 @@ export default function ButtonsOptions({
|
|||||||
const isWrappMiniButtonSetting = useMediaQuery(theme.breakpoints.down(920));
|
const isWrappMiniButtonSetting = useMediaQuery(theme.breakpoints.down(920));
|
||||||
const quiz = useCurrentQuiz();
|
const quiz = useCurrentQuiz();
|
||||||
const { questions } = useQuestionsStore.getState();
|
const { questions } = useQuestionsStore.getState();
|
||||||
const { openBranchingPanel } = useUiTools();
|
|
||||||
|
|
||||||
const openedModal = () => {
|
const openedModal = () => {
|
||||||
updateOpenedModalSettingsId(question.id);
|
updateOpenBranchingPanel(true);
|
||||||
|
updateDesireToOpenABranchingModal(question.content.id);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@ -88,7 +88,8 @@ export default function ButtonsOptions({
|
|||||||
title: "Ветвление",
|
title: "Ветвление",
|
||||||
value: "branching",
|
value: "branching",
|
||||||
myFunc: (question) => {
|
myFunc: (question) => {
|
||||||
// updateOpenBranchingPanel(true);
|
console.log("buttons opiums")
|
||||||
|
updateOpenBranchingPanel(true);
|
||||||
updateDesireToOpenABranchingModal(question.content.id);
|
updateDesireToOpenABranchingModal(question.content.id);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@ -191,7 +191,8 @@ export default function ButtonsOptionsAndPict({
|
|||||||
onMouseEnter={() => setButtonHover("branching")}
|
onMouseEnter={() => setButtonHover("branching")}
|
||||||
onMouseLeave={() => setButtonHover("")}
|
onMouseLeave={() => setButtonHover("")}
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
// updateOpenBranchingPanel(true);
|
console.log("buttonsOptions")
|
||||||
|
updateOpenBranchingPanel(true);
|
||||||
updateDesireToOpenABranchingModal(question.content.id);
|
updateDesireToOpenABranchingModal(question.content.id);
|
||||||
}}
|
}}
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user