неотображение кнопки ветвления у 4 вопросов без ветвления

This commit is contained in:
Nastya 2023-12-27 11:42:10 +03:00
parent ec93f8a052
commit 24c1311631
3 changed files with 60 additions and 56 deletions

@ -53,7 +53,7 @@ export default function App() {
});
useUserAccountFetcher({
url: "https://squiz.pena.digital/squiz/account",
url: "https://squiz.pena.digital/customer/account",
userId,
onNewUserAccount: setUserAccount,
onError: (error) => {

@ -118,53 +118,57 @@ export default function ButtonsOptions({
>
{buttonSetting.map(({ icon, title, value, myFunc }) => (
<Box key={value}>
{value === "branching" ? (
<Tooltip
arrow
placement="right"
componentsProps={{
tooltip: {
sx: {
background: "#fff",
borderRadius: "6px",
color: "#9A9AAF",
boxShadow: "0px 8px 24px rgba(210, 208, 225, 0.4)",
"& .MuiTooltip-arrow": {
color: "#FFF",
},
},
},
}}
title={
<Box>
<Typography
sx={{
color: "#4D4D4D",
fontWeight: "bold",
fontSize: "14px",
marginBottom: "10px",
}}
>
Будет показан при условии
</Typography>
<Typography sx={{ fontWeight: "bold", fontSize: "12px" }}>
Название
</Typography>
<Typography
sx={{
fontWeight: "bold",
fontSize: "12px",
marginBottom: "10px",
}}
>
Условие 1, Условие 2
</Typography>
<Typography sx={{ color: "#7E2AEA", fontSize: "12px" }}>
Все условия обязательны
</Typography>
</Box>
}
>
{value === "branching" ?
question.type === "page" || question.type === "text" || question.type === "date" || question.type === "number" ?
<></>
:
(
// <Tooltip
// arrow
// placement="right"
// componentsProps={{
// tooltip: {
// sx: {
// background: "#fff",
// borderRadius: "6px",
// color: "#9A9AAF",
// boxShadow: "0px 8px 24px rgba(210, 208, 225, 0.4)",
// "& .MuiTooltip-arrow": {
// color: "#FFF",
// },
// },
// },
// }}
// title={
// <Box>
// <Typography
// sx={{
// color: "#4D4D4D",
// fontWeight: "bold",
// fontSize: "14px",
// marginBottom: "10px",
// }}
// >
// Будет показан при условии
// </Typography>
// <Typography sx={{ fontWeight: "bold", fontSize: "12px" }}>
// Название
// </Typography>
// <Typography
// sx={{
// fontWeight: "bold",
// fontSize: "12px",
// marginBottom: "10px",
// }}
// >
// Условие 1, Условие 2
// </Typography>
// <Typography sx={{ color: "#7E2AEA", fontSize: "12px" }}>
// Все условия обязательны
// </Typography>
// </Box>
// }
// >
<MiniButtonSetting
key={title}
onClick={() => {
@ -193,7 +197,7 @@ export default function ButtonsOptions({
{icon}
{isWrappMiniButtonSetting ? null : title}
</MiniButtonSetting>
</Tooltip>
// </Tooltip>
) : (
<>
<MiniButtonSetting
@ -226,7 +230,7 @@ export default function ButtonsOptions({
)}
</Box>
))}
<>
{/* <>
<MiniButtonSetting
onClick={undefined} // TODO
sx={{
@ -257,7 +261,7 @@ export default function ButtonsOptions({
>
<VectorQuestions style={{ color: "#FC712F", fontSize: "9px" }} />
</MiniButtonSetting>
</>
</> */}
</Box>
<Box
sx={{

@ -147,7 +147,7 @@ export default function ButtonsOptionsAndPict({
{isIconMobile ? null : "Подсказка"}
</MiniButtonSetting>
<>
<Tooltip
{/* <Tooltip
arrow
placement="right"
componentsProps={{
@ -192,7 +192,7 @@ export default function ButtonsOptionsAndPict({
</Typography>
</Box>
}
>
> */}
<MiniButtonSetting
onMouseEnter={() => setButtonHover("branching")}
onMouseLeave={() => setButtonHover("")}
@ -232,7 +232,7 @@ export default function ButtonsOptionsAndPict({
/>
{isIconMobile ? null : "Ветвление"}
</MiniButtonSetting>
</Tooltip>
{/* </Tooltip> */}
<MiniButtonSetting
onMouseEnter={() => setButtonHover("image")}
onMouseLeave={() => setButtonHover("")}
@ -266,7 +266,7 @@ export default function ButtonsOptionsAndPict({
/>
{isIconMobile ? null : "Изображение"}
</MiniButtonSetting>
<MiniButtonSetting
{/* <MiniButtonSetting
onClick={() => setOpenedReallyChangingModal(true)}
sx={{
minWidth: "30px",
@ -295,7 +295,7 @@ export default function ButtonsOptionsAndPict({
}}
>
<VectorQuestions style={{ color: "#FC712F", fontSize: "9px" }} />
</MiniButtonSetting>
</MiniButtonSetting> */}
</>
</Box>
<Box