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