From 0f8b448a65abaa9411cde9fe9e0662fa80232b76 Mon Sep 17 00:00:00 2001 From: Nastya Date: Fri, 5 Jan 2024 08:21:39 +0300 Subject: [PATCH 1/4] =?UTF-8?q?=D0=A4=D0=9A=20=D0=BD=D0=B0=20=D0=BC=D0=BE?= =?UTF-8?q?=D0=B1=D0=B8=D0=BB=D0=BA=D0=B5=20=D0=B2=20=D0=BE=D0=BA=D0=BE?= =?UTF-8?q?=D1=88=D0=BA=D0=B5=20=D0=BD=D0=B0=D1=81=D1=82=D1=80=D0=BE=D0=B5?= =?UTF-8?q?=D0=BA=20=D0=BF=D0=BE=D0=BB=D0=B5=D0=B9=20=D0=BF=D0=BE=D0=BC?= =?UTF-8?q?=D0=B5=D1=89=D0=B0=D1=8E=D1=82=D1=81=D1=8F=20=D0=B2=D1=81=D0=B5?= =?UTF-8?q?=20=D0=B8=D0=BC=D0=B5=D0=BD=D0=B0=20=D0=BF=D0=BE=D0=BB=D0=B5?= =?UTF-8?q?=D0=B9,=20+=20=D1=84=D0=B8=D0=BA=D1=81=20=D1=82=D0=B5=D0=BA?= =?UTF-8?q?=D1=81=D0=B0=D1=80=D0=B5=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ContactFormPage/ContactFormPage.tsx | 5 ++++- .../ContactFormPage/NewField/WindowNewField.tsx | 1 + src/pages/ViewPublicationPage/ResultForm.tsx | 17 ++++++++++------- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/pages/ContactFormPage/ContactFormPage.tsx b/src/pages/ContactFormPage/ContactFormPage.tsx index 0633381b..19b380f3 100644 --- a/src/pages/ContactFormPage/ContactFormPage.tsx +++ b/src/pages/ContactFormPage/ContactFormPage.tsx @@ -190,7 +190,10 @@ function ContactFormParent({ outerContainerSx: sx, children }: Props) { rows={8} placeholder="Дополнительный текст формы" sxForm={{ - height: "287px", + height: "197px", + }} + sx={{ + height: "197px" }} maxLength={300} /> diff --git a/src/pages/ContactFormPage/NewField/WindowNewField.tsx b/src/pages/ContactFormPage/NewField/WindowNewField.tsx index 7ccdcdf6..2162691b 100644 --- a/src/pages/ContactFormPage/NewField/WindowNewField.tsx +++ b/src/pages/ContactFormPage/NewField/WindowNewField.tsx @@ -122,6 +122,7 @@ export default function WindowNewField({ drawerState, closeDrawer }: Props) { padding: "20px", display: "flex", gap: "10px", + flexWrap: "wrap" }} > {buttonSetting.flatMap((e, i) => diff --git a/src/pages/ViewPublicationPage/ResultForm.tsx b/src/pages/ViewPublicationPage/ResultForm.tsx index 4b83548b..c656de92 100644 --- a/src/pages/ViewPublicationPage/ResultForm.tsx +++ b/src/pages/ViewPublicationPage/ResultForm.tsx @@ -93,13 +93,16 @@ export const ResultForm = ({ )} - - {resultQuestion.title || "Форма результатов"} - + {resultQuestion.title && + + {resultQuestion.title} + + } + {resultQuestion.content.text !== "" && resultQuestion.content.text !== " " && ( From f907fdd006a7337851effe3d9ae5450192e9576b Mon Sep 17 00:00:00 2001 From: Nastya Date: Fri, 5 Jan 2024 10:07:06 +0300 Subject: [PATCH 2/4] =?UTF-8?q?=D0=BA=D0=BD=D0=BE=D0=BF=D0=BA=D0=B0=20?= =?UTF-8?q?=D0=B2=D0=B5=D1=82=D0=B2=D0=BB=D0=B5=D0=BD=D0=B8=D1=8F=20=D1=80?= =?UTF-8?q?=D0=B0=D0=B1=D0=BE=D1=82=D0=B0=D0=B5=D1=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/question.ts | 1 - src/pages/ContactFormPage/ContactFormPage.tsx | 2 +- .../NewField/WindowNewField.tsx | 2 +- .../Questions/BranchingMap/CsComponent.tsx | 11 +-- .../Questions/BranchingMap/FirstNodeField.tsx | 1 - .../Questions/BranchingMap/hooks/usePopper.ts | 5 - .../BranchingMap/hooks/useRemoveNode.ts | 1 - src/pages/Questions/BranchingMap/index.tsx | 1 - src/pages/Questions/ButtonsOptions.tsx | 12 ++- src/pages/Questions/ButtonsOptionsAndPict.tsx | 6 ++ .../Questions/DataOptions/DataOptions.tsx | 10 +- .../DraggableList/DraggableListItem.tsx | 12 ++- .../DraggableList/QuestionPageCard.tsx | 11 ++- src/pages/Questions/DraggableList/index.tsx | 12 ++- src/pages/Questions/DropDown/DropDown.tsx | 10 +- src/pages/Questions/Emoji/Emoji.tsx | 10 +- .../OptionsAndPicture/OptionsAndPicture.tsx | 8 +- .../OptionsPicture/OptionsPicture.tsx | 10 +- .../Questions/OwnTextField/OwnTextField.tsx | 10 +- .../Questions/PageOptions/PageOptions.tsx | 2 + .../Questions/QuestionSwitchWindowTool.tsx | 9 +- .../Questions/RatingOptions/RatingOptions.tsx | 10 +- .../Questions/SliderOptions/SliderOptions.tsx | 10 +- .../SwitchBranchingPanel/QuestionsList.tsx | 98 ++++++++++--------- src/pages/Questions/SwitchQuestionsPage.tsx | 96 +++++++++++++++--- src/pages/Questions/UploadFile/UploadFile.tsx | 10 +- .../Questions/answerOptions/AnswerOptions.tsx | 11 ++- src/pages/ResultPage/ResultSettings.tsx | 1 - src/pages/ResultPage/cards/ResultCard.tsx | 2 +- src/pages/Tariffs/Tariffs.tsx | 4 - src/pages/Tariffs/tariffsUtils/calcCart.ts | 1 - src/pages/ViewPublicationPage/ContactForm.tsx | 1 - src/pages/ViewPublicationPage/Footer.tsx | 5 - src/pages/ViewPublicationPage/ResultForm.tsx | 5 +- .../startPage/ModalInfoWhyCantCreate.tsx | 2 - src/stores/questions/actions.ts | 4 +- src/ui_kit/MediaSelectionAndDisplay.tsx | 19 ++-- src/ui_kit/QuizPreview/QuizPreviewLayout.tsx | 1 - .../StartPagePreview/YoutubeEmbedIframe.tsx | 1 - src/ui_kit/Toolbars/ButtonRecallQuiz.tsx | 1 - src/utils/deleteFunc.ts | 15 --- 41 files changed, 307 insertions(+), 136 deletions(-) diff --git a/src/api/question.ts b/src/api/question.ts index e7a28fa4..2b5ebd28 100644 --- a/src/api/question.ts +++ b/src/api/question.ts @@ -43,7 +43,6 @@ async function getQuestionList(body?: Partial) { body: { ...defaultGetQuestionListBody, ...body }, method: "POST", }); - console.log(response.items); const clearArrayFromEmptySpaceBlaBlaValue = response.items?.map( (question) => { let data = question; diff --git a/src/pages/ContactFormPage/ContactFormPage.tsx b/src/pages/ContactFormPage/ContactFormPage.tsx index 19b380f3..8b0f4ac0 100644 --- a/src/pages/ContactFormPage/ContactFormPage.tsx +++ b/src/pages/ContactFormPage/ContactFormPage.tsx @@ -193,7 +193,7 @@ function ContactFormParent({ outerContainerSx: sx, children }: Props) { height: "197px", }} sx={{ - height: "197px" + height: "197px", }} maxLength={300} /> diff --git a/src/pages/ContactFormPage/NewField/WindowNewField.tsx b/src/pages/ContactFormPage/NewField/WindowNewField.tsx index 2162691b..f7c8bf7e 100644 --- a/src/pages/ContactFormPage/NewField/WindowNewField.tsx +++ b/src/pages/ContactFormPage/NewField/WindowNewField.tsx @@ -122,7 +122,7 @@ export default function WindowNewField({ drawerState, closeDrawer }: Props) { padding: "20px", display: "flex", gap: "10px", - flexWrap: "wrap" + flexWrap: "wrap", }} > {buttonSetting.flatMap((e, i) => diff --git a/src/pages/Questions/BranchingMap/CsComponent.tsx b/src/pages/Questions/BranchingMap/CsComponent.tsx index ce30b5b7..58a8b399 100644 --- a/src/pages/Questions/BranchingMap/CsComponent.tsx +++ b/src/pages/Questions/BranchingMap/CsComponent.tsx @@ -212,7 +212,7 @@ function CsComponent({ cy?.layout(layoutOptions).run(); cy?.center(es); } else { - enqueueSnackbar("Добавляемый вопрос не найден"); + enqueueSnackbar("Перетащите на плюсик вопрос"); } } else { enqueueSnackbar("Quiz не найден"); @@ -270,7 +270,6 @@ function CsComponent({ if (!noChild) { //детей больше 1 - console.log("детей ", noChild, " открываем модалку ветвления"); //- предупреждаем стор вопросов об открытии модалки ветвления updateOpenedModalSettingsId(targetQuestion.content.id); } @@ -294,19 +293,12 @@ function CsComponent({ //Отработка первичного рендера странички графика const firstRender = useRef(true); useEffect(() => { - console.log("____________ПЕРВЧИНЫЙ РЕНДЕР____________"); - console.log("______someWorkBackend______", someWorkBackend); - if (!someWorkBackend && firstRender.current) { - console.log("цс первично отрабатывает"); document .querySelector("#root") ?.addEventListener("mouseup", cleardragQuestionContentId); const cy = cyRef.current; - console.log("СПИСОК ЭЛЕМЕНТОВ ЦИТОСКЕЙПА В ПЕРВЧИНЫЙ РЕНДЕР"); - console.log(cy?.elements()); - const eles = cy?.add( storeToNodes( questions.filter( @@ -324,7 +316,6 @@ function CsComponent({ } return () => { - console.log("разрендер"); document .querySelector("#root") ?.removeEventListener("mouseup", cleardragQuestionContentId); diff --git a/src/pages/Questions/BranchingMap/FirstNodeField.tsx b/src/pages/Questions/BranchingMap/FirstNodeField.tsx index 7ab285d2..41605490 100644 --- a/src/pages/Questions/BranchingMap/FirstNodeField.tsx +++ b/src/pages/Questions/BranchingMap/FirstNodeField.tsx @@ -24,7 +24,6 @@ export const FirstNodeField = ({ const quiz = useCurrentQuiz(); useLayoutEffect(() => { - console.log("компонент с плюсом"); updateOpenedModalSettingsId(); updateRootContentId(quiz.id, ""); clearRuleForAll(); diff --git a/src/pages/Questions/BranchingMap/hooks/usePopper.ts b/src/pages/Questions/BranchingMap/hooks/usePopper.ts index 5e6a4bc6..3e0c7c7d 100644 --- a/src/pages/Questions/BranchingMap/hooks/usePopper.ts +++ b/src/pages/Questions/BranchingMap/hooks/usePopper.ts @@ -208,7 +208,6 @@ export const usePopper = ({ }); let gearsPopper: Popper | null = null; if (node.data().root !== true) { - console.log(node.data("parentType")); const parentQuestion = getQuestionByContentId( node.data("parentType"), ); @@ -240,16 +239,12 @@ export const usePopper = ({ updateOpenedModalSettingsId(item.id()); }); - console.log("собираюсь анализировать папашу"); - console.log("Тип папаши ", parentQuestion.type); if ( parentQuestion?.type === "date" || parentQuestion?.type === "text" || parentQuestion?.type === "number" || parentQuestion?.type === "page" ) { - console.log("Шестерня должна быть невидимая"); - console.log("Тип папаши ", parentQuestion.type); gearElement.classList.add("popper-gear-none"); } diff --git a/src/pages/Questions/BranchingMap/hooks/useRemoveNode.ts b/src/pages/Questions/BranchingMap/hooks/useRemoveNode.ts index a1057a74..254813e9 100644 --- a/src/pages/Questions/BranchingMap/hooks/useRemoveNode.ts +++ b/src/pages/Questions/BranchingMap/hooks/useRemoveNode.ts @@ -173,7 +173,6 @@ export const useRemoveNode = ({ quiz && cy?.edges(`[source="${parentQuestionContentId}"]`).length === 0 ) { - console.log(parentQuestionContentId); //createFrontResult(quiz.backendId, parentQuestionContentId); } clearDataAfterRemoveNode({ diff --git a/src/pages/Questions/BranchingMap/index.tsx b/src/pages/Questions/BranchingMap/index.tsx index 2393aa8f..6e6c137b 100644 --- a/src/pages/Questions/BranchingMap/index.tsx +++ b/src/pages/Questions/BranchingMap/index.tsx @@ -8,7 +8,6 @@ import { useUiTools } from "@root/uiTools/store"; export const BranchingMap = () => { const quiz = useCurrentQuiz(); - console.log("рендер странички ветвления"); const { dragQuestionContentId } = useUiTools(); const [modalQuestionParentContentId, setModalQuestionParentContentId] = useState(""); diff --git a/src/pages/Questions/ButtonsOptions.tsx b/src/pages/Questions/ButtonsOptions.tsx index 86e496c1..3a1bf9ac 100644 --- a/src/pages/Questions/ButtonsOptions.tsx +++ b/src/pages/Questions/ButtonsOptions.tsx @@ -44,9 +44,17 @@ interface Props { SSHC: (data: string) => void; question: AnyTypedQuizQuestion; sx?: SxProps; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function ButtonsOptions({ SSHC, switchState, question }: Props) { +export default function ButtonsOptions({ + SSHC, + switchState, + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down(790)); const isWrappMiniButtonSetting = useMediaQuery(theme.breakpoints.down(920)); @@ -55,6 +63,7 @@ export default function ButtonsOptions({ SSHC, switchState, question }: Props) { const [openDelete, setOpenDelete] = useState(false); const openedModal = () => { + setOpenBranchingPage(true); updateDesireToOpenABranchingModal(question.content.id); }; @@ -95,6 +104,7 @@ export default function ButtonsOptions({ SSHC, switchState, question }: Props) { title: "Ветвление", value: "branching", myFunc: (question) => { + setOpenBranchingPage(true); updateDesireToOpenABranchingModal(question.content.id); }, }, diff --git a/src/pages/Questions/ButtonsOptionsAndPict.tsx b/src/pages/Questions/ButtonsOptionsAndPict.tsx index 1cb55dca..de16b98e 100644 --- a/src/pages/Questions/ButtonsOptionsAndPict.tsx +++ b/src/pages/Questions/ButtonsOptionsAndPict.tsx @@ -45,13 +45,18 @@ interface Props { switchState: string; SSHC: (data: string) => void; question: QuizQuestionVariant | QuizQuestionVarImg; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } export default function ButtonsOptionsAndPict({ SSHC, switchState, question, + openBranchingPage, + setOpenBranchingPage, }: Props) { + console.log(setOpenBranchingPage); const [buttonHover, setButtonHover] = useState(""); const [openedReallyChangingModal, setOpenedReallyChangingModal] = useState(false); @@ -205,6 +210,7 @@ export default function ButtonsOptionsAndPict({ onMouseEnter={() => setButtonHover("branching")} onMouseLeave={() => setButtonHover("")} onClick={() => { + setOpenBranchingPage(true); updateDesireToOpenABranchingModal(question.content.id); }} sx={{ diff --git a/src/pages/Questions/DataOptions/DataOptions.tsx b/src/pages/Questions/DataOptions/DataOptions.tsx index 57bb3639..f91bb1e9 100644 --- a/src/pages/Questions/DataOptions/DataOptions.tsx +++ b/src/pages/Questions/DataOptions/DataOptions.tsx @@ -14,9 +14,15 @@ import TooltipClickInfo from "@ui_kit/Toolbars/TooltipClickInfo"; interface Props { question: QuizQuestionDate; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function DataOptions({ question }: Props) { +export default function DataOptions({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const [switchState, setSwitchState] = useState("setting"); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down(790)); @@ -71,6 +77,8 @@ export default function DataOptions({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/DraggableList/DraggableListItem.tsx b/src/pages/Questions/DraggableList/DraggableListItem.tsx index 15a89593..e03a3e79 100644 --- a/src/pages/Questions/DraggableList/DraggableListItem.tsx +++ b/src/pages/Questions/DraggableList/DraggableListItem.tsx @@ -15,9 +15,17 @@ type Props = { question: AnyTypedQuizQuestion | UntypedQuizQuestion; isDragging: boolean; index: number; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; }; -function DraggableListItem({ question, isDragging, index }: Props) { +function DraggableListItem({ + question, + isDragging, + index, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const theme = useTheme(); const { editSomeQuestion } = useUiTools(); @@ -87,6 +95,8 @@ function DraggableListItem({ question, isDragging, index }: Props) { ) : ( void; } export default function QuestionsPageCard({ @@ -64,6 +66,8 @@ export default function QuestionsPageCard({ draggableProps, isDragging, index, + openBranchingPage, + setOpenBranchingPage, }: Props) { const maxLengthTextField = 225; @@ -292,6 +296,7 @@ export default function QuestionsPageCard({ onClick={() => { if (question.type === null) { deleteQuestion(question.id); + return; } if (question.content.rule.parentId.length !== 0) { setOpenDelete(true); @@ -402,7 +407,11 @@ export default function QuestionsPageCard({ {question.type === null ? ( ) : ( - + )} )} diff --git a/src/pages/Questions/DraggableList/index.tsx b/src/pages/Questions/DraggableList/index.tsx index 3b67798d..a38db144 100644 --- a/src/pages/Questions/DraggableList/index.tsx +++ b/src/pages/Questions/DraggableList/index.tsx @@ -4,8 +4,14 @@ import type { DropResult } from "react-beautiful-dnd"; import { DragDropContext, Droppable } from "react-beautiful-dnd"; import DraggableListItem from "./DraggableListItem"; import { useQuestionsStore } from "@root/questions/store"; - -export const DraggableList = () => { +interface Props { + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; +} +export const DraggableList = ({ + openBranchingPage, + setOpenBranchingPage, +}: Props) => { const { questions } = useQuestionsStore(); const filteredQuestions = questions.filter( (question) => question.type !== "result", @@ -21,6 +27,8 @@ export const DraggableList = () => { {filteredQuestions.map((question, index) => ( void; } -export default function DropDown({ question }: Props) { +export default function DropDown({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const onClickAddAnAnswer = useAddAnswer(); const [switchState, setSwitchState] = useState("setting"); const theme = useTheme(); @@ -92,6 +98,8 @@ export default function DropDown({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/Emoji/Emoji.tsx b/src/pages/Questions/Emoji/Emoji.tsx index f1d24c66..c30ebcc8 100644 --- a/src/pages/Questions/Emoji/Emoji.tsx +++ b/src/pages/Questions/Emoji/Emoji.tsx @@ -21,9 +21,15 @@ import { useAddAnswer } from "../../../utils/hooks/useAddAnswer"; interface Props { question: QuizQuestionEmoji; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function Emoji({ question }: Props) { +export default function Emoji({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const [switchState, setSwitchState] = useState("setting"); const onClickAddAnAnswer = useAddAnswer(); const [open, setOpen] = useState(false); @@ -237,6 +243,8 @@ export default function Emoji({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/OptionsAndPicture/OptionsAndPicture.tsx b/src/pages/Questions/OptionsAndPicture/OptionsAndPicture.tsx index 88f57435..df8199ad 100644 --- a/src/pages/Questions/OptionsAndPicture/OptionsAndPicture.tsx +++ b/src/pages/Questions/OptionsAndPicture/OptionsAndPicture.tsx @@ -32,9 +32,14 @@ import SwitchOptionsAndPict from "./switchOptionsAndPict"; interface Props { question: QuizQuestionVarImg; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function OptionsAndPicture({ question }: Props) { +export default function OptionsAndPicture({ + question, + setOpenBranchingPage, +}: Props) { const [switchState, setSwitchState] = useState("setting"); const [selectedVariantId, setSelectedVariantId] = useState( null, @@ -390,6 +395,7 @@ export default function OptionsAndPicture({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/OptionsPicture/OptionsPicture.tsx b/src/pages/Questions/OptionsPicture/OptionsPicture.tsx index 6b89494f..b4c37985 100644 --- a/src/pages/Questions/OptionsPicture/OptionsPicture.tsx +++ b/src/pages/Questions/OptionsPicture/OptionsPicture.tsx @@ -18,9 +18,15 @@ import { useAddAnswer } from "../../../utils/hooks/useAddAnswer"; interface Props { question: QuizQuestionImages; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function OptionsPicture({ question }: Props) { +export default function OptionsPicture({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const theme = useTheme(); const onClickAddAnAnswer = useAddAnswer(); const quizQid = useCurrentQuiz()?.qid; @@ -187,6 +193,8 @@ export default function OptionsPicture({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/OwnTextField/OwnTextField.tsx b/src/pages/Questions/OwnTextField/OwnTextField.tsx index cf3c2b18..4be6ad4a 100644 --- a/src/pages/Questions/OwnTextField/OwnTextField.tsx +++ b/src/pages/Questions/OwnTextField/OwnTextField.tsx @@ -17,9 +17,15 @@ import TooltipClickInfo from "@ui_kit/Toolbars/TooltipClickInfo"; interface Props { question: QuizQuestionText; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function OwnTextField({ question }: Props) { +export default function OwnTextField({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const [switchState, setSwitchState] = useState("setting"); const theme = useTheme(); const isMobile = useMediaQuery(theme.breakpoints.down(790)); @@ -98,6 +104,8 @@ export default function OwnTextField({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/PageOptions/PageOptions.tsx b/src/pages/Questions/PageOptions/PageOptions.tsx index 6d15e441..e18d3d41 100644 --- a/src/pages/Questions/PageOptions/PageOptions.tsx +++ b/src/pages/Questions/PageOptions/PageOptions.tsx @@ -31,6 +31,8 @@ import { updateDesireToOpenABranchingModal } from "@root/uiTools/actions"; type Props = { disableInput?: boolean; question: QuizQuestionPage; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; }; export default function PageOptions({ disableInput, question }: Props) { diff --git a/src/pages/Questions/QuestionSwitchWindowTool.tsx b/src/pages/Questions/QuestionSwitchWindowTool.tsx index e2365e6b..10f89bae 100644 --- a/src/pages/Questions/QuestionSwitchWindowTool.tsx +++ b/src/pages/Questions/QuestionSwitchWindowTool.tsx @@ -41,7 +41,14 @@ export const QuestionSwitchWindowTool = ({ }} > - {openBranchingPage ? : } + {openBranchingPage ? ( + + ) : ( + + )} {openBranchingPage && ( void; } export type ButtonRatingFrom = { @@ -29,7 +31,11 @@ export type ButtonRatingFrom = { icon: JSX.Element; }; -export default function RatingOptions({ question }: Props) { +export default function RatingOptions({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const [switchState, setSwitchState] = useState("setting"); const [negativeText, setNegativeText] = useState(""); const [positiveText, setPositiveText] = useState(""); @@ -270,6 +276,8 @@ export default function RatingOptions({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/SliderOptions/SliderOptions.tsx b/src/pages/Questions/SliderOptions/SliderOptions.tsx index 5e6bdaaf..84ea77f4 100644 --- a/src/pages/Questions/SliderOptions/SliderOptions.tsx +++ b/src/pages/Questions/SliderOptions/SliderOptions.tsx @@ -13,9 +13,15 @@ import type { QuizQuestionNumber } from "../../../model/questionTypes/number"; interface Props { question: QuizQuestionNumber; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function SliderOptions({ question }: Props) { +export default function SliderOptions({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const theme = useTheme(); const isTablet = useMediaQuery(theme.breakpoints.down(980)); const isMobile = useMediaQuery(theme.breakpoints.down(790)); @@ -274,6 +280,8 @@ export default function SliderOptions({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/SwitchBranchingPanel/QuestionsList.tsx b/src/pages/Questions/SwitchBranchingPanel/QuestionsList.tsx index 4ed79efd..6f6e54a0 100644 --- a/src/pages/Questions/SwitchBranchingPanel/QuestionsList.tsx +++ b/src/pages/Questions/SwitchBranchingPanel/QuestionsList.tsx @@ -39,6 +39,13 @@ export const QuestionsList = ({ setOpenBranchingPage = () => {} }: Props) => { (question) => question.type !== "result", ); + useEffect(() => { + if (desireToOpenABranchingModal) { + const element = document.getElementById(desireToOpenABranchingModal); + if (element !== null) element.scrollIntoView(); + } + }, [desireToOpenABranchingModal]); + return ( {} }: Props) => { > {/* тут нужно будет фильтровать с проверкой, что вопрос имеет тип*/} {questions - .filter((q: AnyQuestion) => q.type) - .map(({ title, content }, index) => ( - - ))} + + {title || "нет заголовка"} + + { + setOpenBranchingPage(); + updateEditSomeQuestion(content.id); + }} + > + + + {content.rule.parentId && } + + ); + })} ); diff --git a/src/pages/Questions/SwitchQuestionsPage.tsx b/src/pages/Questions/SwitchQuestionsPage.tsx index 44911e35..b64ab14f 100644 --- a/src/pages/Questions/SwitchQuestionsPage.tsx +++ b/src/pages/Questions/SwitchQuestionsPage.tsx @@ -14,42 +14,114 @@ import { notReachable } from "../../utils/notReachable"; interface Props { question: AnyTypedQuizQuestion; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function SwitchQuestionsPage({ question }: Props) { +export default function SwitchQuestionsPage({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { switch (question.type) { case "variant": - return ; + return ( + + ); case "images": - return ; + return ( + + ); case "varimg": - return ; + return ( + + ); case "emoji": - return ; + return ( + + ); case "text": - return ; + return ( + + ); case "select": - return ; + return ( + + ); case "date": - return ; + return ( + + ); case "number": - return ; + return ( + + ); case "file": - return ; + return ( + + ); case "page": - return ; + return ( + + ); case "rating": - return ; + return ( + + ); default: notReachable(question); diff --git a/src/pages/Questions/UploadFile/UploadFile.tsx b/src/pages/Questions/UploadFile/UploadFile.tsx index 805a94ec..71923d38 100644 --- a/src/pages/Questions/UploadFile/UploadFile.tsx +++ b/src/pages/Questions/UploadFile/UploadFile.tsx @@ -36,9 +36,15 @@ const DESIGN_TYPES: DesignItem[] = [ interface Props { question: QuizQuestionFile; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function UploadFile({ question }: Props) { +export default function UploadFile({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { const [switchState, setSwitchState] = useState("setting"); const theme = useTheme(); const isTablet = useMediaQuery(theme.breakpoints.down(980)); @@ -201,6 +207,8 @@ export default function UploadFile({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/Questions/answerOptions/AnswerOptions.tsx b/src/pages/Questions/answerOptions/AnswerOptions.tsx index fe37e7a9..e06c7990 100755 --- a/src/pages/Questions/answerOptions/AnswerOptions.tsx +++ b/src/pages/Questions/answerOptions/AnswerOptions.tsx @@ -10,9 +10,16 @@ import { useAddAnswer } from "../../../utils/hooks/useAddAnswer"; interface Props { question: QuizQuestionVariant; + openBranchingPage: boolean; + setOpenBranchingPage: (a: boolean) => void; } -export default function AnswerOptions({ question }: Props) { +export default function AnswerOptions({ + question, + openBranchingPage, + setOpenBranchingPage, +}: Props) { + console.log(setOpenBranchingPage); const onClickAddAnAnswer = useAddAnswer(); const [switchState, setSwitchState] = useState("setting"); const theme = useTheme(); @@ -89,6 +96,8 @@ export default function AnswerOptions({ question }: Props) { switchState={switchState} SSHC={SSHC} question={question} + openBranchingPage={openBranchingPage} + setOpenBranchingPage={setOpenBranchingPage} /> diff --git a/src/pages/ResultPage/ResultSettings.tsx b/src/pages/ResultPage/ResultSettings.tsx index 0212b903..65a40fd7 100644 --- a/src/pages/ResultPage/ResultSettings.tsx +++ b/src/pages/ResultPage/ResultSettings.tsx @@ -76,7 +76,6 @@ export const ResultSettings = () => { const leavePage = (leave: boolean) => { if (leave) { - console.log("ливаем"); } setOpenNotificationModal(false); diff --git a/src/pages/ResultPage/cards/ResultCard.tsx b/src/pages/ResultPage/cards/ResultCard.tsx index be598ad8..1d75583b 100644 --- a/src/pages/ResultPage/cards/ResultCard.tsx +++ b/src/pages/ResultPage/cards/ResultCard.tsx @@ -360,7 +360,7 @@ export const ResultCard = ({ resultContract, resultData }: Props) => { border: "1px solid #9A9AAF", background: " #F2F3F7", color: "#9A9AAF", - my: "30px", + my: "30px", }} > Кнопка + diff --git a/src/pages/Tariffs/Tariffs.tsx b/src/pages/Tariffs/Tariffs.tsx index 809b82e4..1dd3f007 100644 --- a/src/pages/Tariffs/Tariffs.tsx +++ b/src/pages/Tariffs/Tariffs.tsx @@ -53,10 +53,6 @@ function TariffPage() { if (!user || !tariffs || !discounts) return ; - console.log("user ", user); - console.log("tariffs ", tariffs); - console.log("discounts ", discounts); - const openModalHC = (tariffInfo: any) => setOpenModal(tariffInfo); const tryBuy = async ({ id, price }: { id: string; price: number }) => { openModalHC({}); diff --git a/src/pages/Tariffs/tariffsUtils/calcCart.ts b/src/pages/Tariffs/tariffsUtils/calcCart.ts index b2a3f74f..ec1612d8 100644 --- a/src/pages/Tariffs/tariffsUtils/calcCart.ts +++ b/src/pages/Tariffs/tariffsUtils/calcCart.ts @@ -78,7 +78,6 @@ function findCartDiscount( cartPurchasesAmount >= Number(discount.Condition.CartPurchasesAmount) ); }); - console.log("FCD", applicableDiscounts); if (!applicableDiscounts.length) return null; diff --git a/src/pages/ViewPublicationPage/ContactForm.tsx b/src/pages/ViewPublicationPage/ContactForm.tsx index 562d49ba..33a11260 100644 --- a/src/pages/ViewPublicationPage/ContactForm.tsx +++ b/src/pages/ViewPublicationPage/ContactForm.tsx @@ -249,7 +249,6 @@ const Inputs = (currentQuestion: any) => { //@ts-ignore const FC: any = quiz?.config.formContact.fields; - console.log(FC); //@ts-ignore const Name = ( diff --git a/src/pages/ViewPublicationPage/Footer.tsx b/src/pages/ViewPublicationPage/Footer.tsx index e6ad1ad6..f2d2350f 100644 --- a/src/pages/ViewPublicationPage/Footer.tsx +++ b/src/pages/ViewPublicationPage/Footer.tsx @@ -115,15 +115,12 @@ export const Footer = ({ } const isEmpty = checkEmptyData({ resultData: nextQuestion }); - console.log("пустой результат? ", isEmpty); if (nextQuestion) { if (nextQuestion && quiz?.config.resultInfo.when === "before") { if (isEmpty) { setShowContactForm(true); //до+пустая = кидать на ФК - console.log("до+пустая = кидать на ФК"); } else { setShowResultForm(true); //до+заполнена = показать - console.log("до+заполнена = показать"); } } if ( @@ -133,10 +130,8 @@ export const Footer = ({ ) { if (isEmpty) { setShowContactForm(true); //после+пустая - console.log("после+пустая"); } else { setShowContactForm(true); //после+заполнена = показать ФК - console.log("после+заполнена = показать"); } } } diff --git a/src/pages/ViewPublicationPage/ResultForm.tsx b/src/pages/ViewPublicationPage/ResultForm.tsx index c656de92..223e0e66 100644 --- a/src/pages/ViewPublicationPage/ResultForm.tsx +++ b/src/pages/ViewPublicationPage/ResultForm.tsx @@ -93,7 +93,7 @@ export const ResultForm = ({ )} - {resultQuestion.title && + {resultQuestion.title && ( {resultQuestion.title} - } - + )} {resultQuestion.content.text !== "" && resultQuestion.content.text !== " " && ( diff --git a/src/pages/startPage/ModalInfoWhyCantCreate.tsx b/src/pages/startPage/ModalInfoWhyCantCreate.tsx index 8a04ef8c..82c1ea25 100644 --- a/src/pages/startPage/ModalInfoWhyCantCreate.tsx +++ b/src/pages/startPage/ModalInfoWhyCantCreate.tsx @@ -8,9 +8,7 @@ export const ModalInfoWhyCantCreate = () => { const { whyCantCreatePublic, openModalInfoWhyCantCreate } = useUiTools(); useLayoutEffect(() => { - console.log(whyCantCreatePublic); if (Object.values(whyCantCreatePublic).length === 0) { - console.log("нет проблем"); updateModalInfoWhyCantCreate(false); } }, [openModalInfoWhyCantCreate]); diff --git a/src/stores/questions/actions.ts b/src/stores/questions/actions.ts index 4df96b62..e2cb3978 100644 --- a/src/stores/questions/actions.ts +++ b/src/stores/questions/actions.ts @@ -439,7 +439,9 @@ export const changeQuestionType = (questionId: string, type: QuestionType) => { const oldRule = question.content.rule; oldRule.main = []; question.type = type; - question.content = defaultQuestionByType[type].content; + question.content = JSON.parse( + JSON.stringify(defaultQuestionByType[type].content), + ); question.content.id = oldId; question.content.rule = oldRule; }); diff --git a/src/ui_kit/MediaSelectionAndDisplay.tsx b/src/ui_kit/MediaSelectionAndDisplay.tsx index ee8d39db..dd7a7b3d 100644 --- a/src/ui_kit/MediaSelectionAndDisplay.tsx +++ b/src/ui_kit/MediaSelectionAndDisplay.tsx @@ -1,5 +1,12 @@ import { FC } from "react"; -import { Box, Button, ButtonBase, Tooltip, Typography, useTheme } from "@mui/material"; +import { + Box, + Button, + ButtonBase, + Tooltip, + Typography, + useTheme, +} from "@mui/material"; import CustomTextField from "./CustomTextField"; import { updateQuestion, uploadQuestionImage } from "@root/questions/actions"; import { CropModal, useCropModalState } from "@ui_kit/Modal/CropModal"; @@ -19,7 +26,7 @@ interface Iprops { export const MediaSelectionAndDisplay: FC = ({ resultData }) => { const quizQid = useCurrentQuiz()?.qid; - const theme = useTheme() + const theme = useTheme(); const { isCropModalOpen, openCropModal, @@ -30,7 +37,6 @@ export const MediaSelectionAndDisplay: FC = ({ resultData }) => { } = useCropModalState(); const [isImageUploadOpen, openImageUploadModal, closeImageUploadModal] = useDisclosure(); - console.log(resultData) async function handleImageUpload(file: File) { const url = await uploadQuestionImage( resultData.id, @@ -182,7 +188,7 @@ export const MediaSelectionAndDisplay: FC = ({ resultData }) => { width: "48px", display: "flex", alignItems: "center", - my: "20px" + my: "20px", }} > = ({ resultData }) => { }, ); } - }} hidden accept=".mp4" @@ -213,7 +218,9 @@ export const MediaSelectionAndDisplay: FC = ({ resultData }) => { }} /> - {resultData.content.video ? diff --git a/src/ui_kit/QuizPreview/QuizPreviewLayout.tsx b/src/ui_kit/QuizPreview/QuizPreviewLayout.tsx index a5e4597d..c0fe92d3 100644 --- a/src/ui_kit/QuizPreview/QuizPreviewLayout.tsx +++ b/src/ui_kit/QuizPreview/QuizPreviewLayout.tsx @@ -74,7 +74,6 @@ export default function QuizPreviewLayout() { observer.current.observe(PreviewWin.current); }, [PreviewWin, observer]); - console.log("current width state: ", widthPreview); return ( { const quiz = useCurrentQuiz(); const { whyCantCreatePublic, canCreatePublic } = useUiTools(); - console.log(quiz?.status); const [buttonText, setButtonText] = useState( quiz?.status === "stop" ? "Опубликовать" : "Отозвать", ); diff --git a/src/utils/deleteFunc.ts b/src/utils/deleteFunc.ts index b851d577..e250975b 100644 --- a/src/utils/deleteFunc.ts +++ b/src/utils/deleteFunc.ts @@ -66,21 +66,12 @@ export const DeleteFunction = async ( const newRule = {}; const parentChildren = [...parentQuestion.content.rule.children]; - console.log( - "_________________УДАЛЯЕМЫЙ ВОПРОС_________________", - question.content.id, - ); - console.log(parentChildren); - console.log(question.content.id); - console.log(parentChildren.includes(question.content.id)); - if (parentChildren.includes(question.content.id)) parentChildren.splice( parentQuestion.content.rule.children.indexOf(question.content.id), 1, ); - console.log("получившийся массив ", parentChildren); newRule.main = parentQuestion.content.rule.main.filter( (data) => data.next !== question.content.id, ); //удаляем условия перехода от родителя к этому вопросу @@ -103,20 +94,14 @@ export const DeleteFunction = async ( ); //сделать результ родителя видимым если у него не осталось потомков - console.log( - "пришло время анализировать сделать ли результат родителя видимым", - ); - console.log("количество детей ", startCountParentChildren.length); if (startCountParentChildren.length === 1) { if (parentResult) { - console.log("я нашел результат родителя"); await updateQuestion(parentResult.content.id, (q) => { q.content.usage = true; }); } else { //почему-то не существует результа у родителя. Создаём. Новосозданные результы видны сразу - console.log("я не нашел результат родителя"); await createResult(quiz.backendId, parentQuestion.content.id); } } From 55c4b268344124e65848bb03a735b1b67e0a0aa6 Mon Sep 17 00:00:00 2001 From: Nastya Date: Fri, 5 Jan 2024 11:43:42 +0300 Subject: [PATCH 3/4] =?UTF-8?q?=D1=81=D1=82=D1=80=D0=B0=D0=BD=D0=B8=D1=86?= =?UTF-8?q?=D0=B0=20=D1=82=D0=B0=D1=80=D0=B8=D1=84=D0=BE=D0=B2=20=D0=BA?= =?UTF-8?q?=D1=80=D0=B0=D1=81=D0=B8=D0=B2=D0=B5=D0=B5,=20=D1=83=D0=BC?= =?UTF-8?q?=D0=B5=D0=B5=D1=82=20=D0=B2=D0=BE=D0=B7=D0=B2=D1=80=D0=B0=D1=89?= =?UTF-8?q?=D0=B0=D1=82=D1=8C=20=D0=BD=D0=B0=20=D0=BB=D0=B8=D1=81=D1=82=20?= =?UTF-8?q?=D0=B8=20=D1=80=D0=B5=D0=B0=D0=BA=D1=82=D0=B8=D0=B2=D0=BD=D0=BE?= =?UTF-8?q?=20=D0=BF=D0=BE=D0=BA=D0=B0=D0=B7=D1=8B=D0=B2=D0=B0=D0=B5=D1=82?= =?UTF-8?q?=20=D0=B1=D0=B0=D0=BB=D0=B0=D0=BD=D1=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/Tariffs/Tariffs.tsx | 128 ++++++++++++++++++++++------- src/pages/createQuize/QuizCard.tsx | 2 +- 2 files changed, 101 insertions(+), 29 deletions(-) diff --git a/src/pages/Tariffs/Tariffs.tsx b/src/pages/Tariffs/Tariffs.tsx index 1dd3f007..2d619642 100644 --- a/src/pages/Tariffs/Tariffs.tsx +++ b/src/pages/Tariffs/Tariffs.tsx @@ -1,22 +1,32 @@ -import { useLocation, useNavigate } from "react-router-dom"; +import { Link, useLocation, useNavigate } from "react-router-dom"; import { makeRequest } from "@frontend/kitui"; import { useEffect, useState } from "react"; import type { GetTariffsResponse } from "@model/tariff"; +import { clearAuthToken } from "@frontend/kitui"; +import { logout } from "@api/auth"; +import ArrowDown from "../../assets/icons/ArrowDownIcon"; import { Box, Button, + Container, Modal, Paper, Typography, useMediaQuery, useTheme, + IconButton } from "@mui/material"; import { enqueueSnackbar } from "notistack"; import { Tariff, getMessageFromFetchError } from "@frontend/kitui"; import { withErrorBoundary } from "react-error-boundary"; import { createTariffElements } from "./tariffsUtils/createTariffElements"; import HeaderFull from "@ui_kit/Header/HeaderFull"; +import Logotip from "../../pages/Landing/images/icons/QuizLogo"; +import { LogoutButton } from "@ui_kit/LogoutButton"; +import { clearUserData } from "@root/user"; +import ArrowLeft from "@icons/questionsPage/arrowLeft"; +import { currencyFormatter } from "./tariffsUtils/currencyFormatter"; function TariffPage() { const theme = useTheme(); @@ -29,6 +39,7 @@ function TariffPage() { const [discounts, setDiscounts] = useState(); const [cartTariffMap, setCartTariffMap] = useState(); const [openModal, setOpenModal] = useState({}); + const [cash, setCash] = useState("0"); useEffect(() => { const get = async () => { @@ -47,6 +58,8 @@ function TariffPage() { setUser(user); setTariffs(tariffs); setDiscounts(discounts.Discounts); + let c = currencyFormatter.format(Number(user.wallet.cash) / 100) + setCash(c) }; get(); }, []); @@ -68,10 +81,13 @@ function TariffPage() { //Если нам хватает денежек - покупаем тариф if (price <= user.wallet.cash) { try { - await makeRequest({ + const data = await makeRequest({ method: "POST", - url: "https://suiz.pena.digital/customer/cart/pay", + url: "https://squiz.pena.digital/customer/cart/pay", }); + setCash(currencyFormatter.format(Number(data.wallet.cash) / 100)) + enqueueSnackbar("Тариф успешно приобретён"); + } catch (e) { enqueueSnackbar("Произошла ошибка. Попробуйте позже"); } @@ -82,9 +98,8 @@ function TariffPage() { // history.pushState({}, null, "https://hub.pena.digital/wallet?action=squizpay"); var link = document.createElement("a"); - link.href = `https://hub.pena.digital/payment?action=squizpay&dif=${ - (price - Number(user.wallet.cash)) * 100 - }`; + link.href = `https://hub.pena.digital/payment?action=squizpay&dif=${(price - Number(user.wallet.cash)) * 100 + }`; document.body.appendChild(link); // link.click(); } @@ -100,19 +115,72 @@ function TariffPage() { ); }); + async function handleLogoutClick() { + const [, logoutError] = await logout(); + + if (logoutError) { + return enqueueSnackbar(logoutError); + } + + clearAuthToken(); + clearUserData(); + navigate("/"); + } return ( <> - + + + + + navigate("/list")}> + + + + + + Мой баланс + + + {cash} + + + + + {createTariffElements( @@ -163,7 +231,7 @@ export const Tariffs = withErrorBoundary(TariffPage, { Ошибка загрузки тарифов ), - onError: () => {}, + onError: () => { }, }); const LoadingPage = () => ( @@ -183,22 +251,26 @@ const LoadingPage = () => ( export const inCart = () => { let saveCart = JSON.parse(localStorage.getItem("saveCart") || "[]"); - saveCart.forEach(async (id: string) => { - try { - await makeRequest({ - method: "PATCH", - url: `https://hub.pena.digital/customer/cart?id=${id}`, - }); + if (Array.isArray(saveCart)) { + saveCart.forEach(async (id: string) => { + try { + await makeRequest({ + method: "PATCH", + url: `https://hub.pena.digital/customer/cart?id=${id}`, + }); - let index = saveCart.indexOf("green"); - if (index !== -1) { - saveCart.splice(index, 1); + let index = saveCart.indexOf("green"); + if (index !== -1) { + saveCart.splice(index, 1); + } + localStorage.setItem("saveCart", JSON.stringify(saveCart)); + } catch (e) { + console.log("Я не смог добавить тариф в корзину :( " + id); } - localStorage.setItem("saveCart", JSON.stringify(saveCart)); - } catch (e) { - console.log("Я не смог добавить тариф в корзину :( " + id); - } - }); + }); + } else { + localStorage.setItem("saveCart", "[]") + } }; const outCart = (cart: string[]) => { //Сделаем муторно и подольше, зато при прерывании сессии данные потеряются минимально @@ -206,7 +278,7 @@ const outCart = (cart: string[]) => { try { await makeRequest({ method: "DELETE", - url: `https://suiz.pena.digital/customer/cart?id=${id}`, + url: `https://squiz.pena.digital/customer/cart?id=${id}`, }); let saveCart = JSON.parse(localStorage.getItem("saveCart") || "[]"); saveCart = saveCart.push(id); diff --git a/src/pages/createQuize/QuizCard.tsx b/src/pages/createQuize/QuizCard.tsx index 80d3f973..0dae2c01 100755 --- a/src/pages/createQuize/QuizCard.tsx +++ b/src/pages/createQuize/QuizCard.tsx @@ -50,7 +50,7 @@ export default function QuizCard({ try { await makeRequest({ method: "POST", - url: "https://suiz.pena.digital/customer/cart/pay", + url: "https://squiz.pena.digital/customer/cart/pay", }); inCart(); } catch (e) { From 844cd8787bcaf059dcac7d14c7db8e6d0b9e4bdf Mon Sep 17 00:00:00 2001 From: Tamara Date: Fri, 5 Jan 2024 11:54:44 +0300 Subject: [PATCH 4/4] =?UTF-8?q?=D0=BE=D0=B3=D1=80=D0=B0=D0=BD=D0=B8=D1=87?= =?UTF-8?q?=D0=B5=D0=BD=D0=B8=D0=B5=20=D1=80=D0=B0=D0=B7=D0=BC=D0=B5=D1=80?= =?UTF-8?q?=D0=BE=D0=B2=20=D0=B2=D0=B0=D1=80=D0=B8=D0=B0=D0=BD=D1=82=D0=B0?= =?UTF-8?q?=20=D0=BE=D1=82=D0=B2=D0=B5=D1=82=D0=BE=D0=B2,=20=D1=83=D0=B1?= =?UTF-8?q?=D1=80=D0=B0=D0=BB=D0=B0=20=D0=BB=D0=B8=D1=88=D0=BD=D0=B8=D0=B9?= =?UTF-8?q?=20=D1=81=D0=BA=D1=80=D0=BE=D0=BB=D0=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/pages/ViewPublicationPage/questions/Variant.tsx | 1 + src/pages/main.tsx | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/pages/ViewPublicationPage/questions/Variant.tsx b/src/pages/ViewPublicationPage/questions/Variant.tsx index 5eae93b6..12883911 100644 --- a/src/pages/ViewPublicationPage/questions/Variant.tsx +++ b/src/pages/ViewPublicationPage/questions/Variant.tsx @@ -149,6 +149,7 @@ const VariantItem = ({ : theme.palette.background.default, display: "flex", maxWidth: "685px", + maxHeight: "85px", justifyContent: "space-between", width: "100%", "&.MuiFormControl-root": { diff --git a/src/pages/main.tsx b/src/pages/main.tsx index 436a6031..8ebbf855 100755 --- a/src/pages/main.tsx +++ b/src/pages/main.tsx @@ -128,7 +128,7 @@ export default function Main({ sidebar, header, footer, Page }: Props) { sx={{ background: theme.palette.background.default, width: "100%", - overflow: "auto", + // overflow: "auto", boxSizing: "border-box", }} >