fix: requests
This commit is contained in:
parent
a23181e7db
commit
7dc71b91e1
@ -4,10 +4,15 @@ interface Props {
|
|||||||
color?: string;
|
color?: string;
|
||||||
bgcolor?: string;
|
bgcolor?: string;
|
||||||
marL?: string;
|
marL?: string;
|
||||||
width?: string
|
width?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export default function CopyIcon({ color, bgcolor, marL, width = "36px" }: Props) {
|
export default function CopyIcon({
|
||||||
|
color,
|
||||||
|
bgcolor,
|
||||||
|
marL,
|
||||||
|
width = "36px",
|
||||||
|
}: Props) {
|
||||||
const theme = useTheme();
|
const theme = useTheme();
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|||||||
@ -122,7 +122,7 @@ export const DesignFilling = ({
|
|||||||
width: "100%",
|
width: "100%",
|
||||||
borderRadius: "12px",
|
borderRadius: "12px",
|
||||||
height: "calc(100vh - 300px)",
|
height: "calc(100vh - 300px)",
|
||||||
mb: "76px"
|
mb: "76px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box
|
<Box
|
||||||
|
|||||||
@ -158,11 +158,14 @@ export default function QuizInstallationCard() {
|
|||||||
<IconButton
|
<IconButton
|
||||||
edge="end"
|
edge="end"
|
||||||
sx={{ marginTop: "22px" }}
|
sx={{ marginTop: "22px" }}
|
||||||
onClick={() => navigator.clipboard.writeText( // TODO
|
onClick={() =>
|
||||||
|
navigator.clipboard.writeText(
|
||||||
|
// TODO
|
||||||
document.getElementById(
|
document.getElementById(
|
||||||
"outlined-multiline-static"
|
"outlined-multiline-static",
|
||||||
).value
|
).value,
|
||||||
)}
|
)
|
||||||
|
}
|
||||||
>
|
>
|
||||||
<CopyIcon
|
<CopyIcon
|
||||||
color={"#ffffff"}
|
color={"#ffffff"}
|
||||||
|
|||||||
@ -136,8 +136,7 @@ export const VKPixelInstruction = () => {
|
|||||||
<ListItem>
|
<ListItem>
|
||||||
<Typography>
|
<Typography>
|
||||||
• Посетитель отправил заявку с заполненным полем Х:
|
• Посетитель отправил заявку с заполненным полем Х:
|
||||||
<b>penaquiz-formfield-X</b>, где X — одно из полей.
|
<b>penaquiz-formfield-X</b>, где X — одно из полей. Например,
|
||||||
Например,
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<List>
|
<List>
|
||||||
@ -163,7 +162,8 @@ export const VKPixelInstruction = () => {
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<Typography>
|
<Typography>
|
||||||
<b>penaquiz</b>-formfield-text (это будет кастомное поле, которое вы настроили сами)
|
<b>penaquiz</b>-formfield-text (это будет кастомное поле,
|
||||||
|
которое вы настроили сами)
|
||||||
</Typography>
|
</Typography>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
@ -132,8 +132,7 @@ export const YandexInstruction = () => {
|
|||||||
<ListItem>
|
<ListItem>
|
||||||
<Typography>
|
<Typography>
|
||||||
• Посетитель отправил заявку с заполненным полем Х:
|
• Посетитель отправил заявку с заполненным полем Х:
|
||||||
<b>penaquiz-formfield-X</b>, где X — одно из полей.
|
<b>penaquiz-formfield-X</b>, где X — одно из полей. Например,
|
||||||
Например,
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
<List>
|
<List>
|
||||||
@ -159,7 +158,8 @@ export const YandexInstruction = () => {
|
|||||||
</ListItem>
|
</ListItem>
|
||||||
<ListItem>
|
<ListItem>
|
||||||
<Typography>
|
<Typography>
|
||||||
<b>penaquiz</b>-formfield-text (это будет кастомное поле, которое вы настроили сами)
|
<b>penaquiz</b>-formfield-text (это будет кастомное поле,
|
||||||
|
которое вы настроили сами)
|
||||||
</Typography>
|
</Typography>
|
||||||
</ListItem>
|
</ListItem>
|
||||||
</List>
|
</List>
|
||||||
|
|||||||
@ -168,10 +168,7 @@ export default function HowItWorks() {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Icon21 />
|
<Icon21 />
|
||||||
<Typography fontSize="18px">
|
<Typography fontSize="18px"> на сайте</Typography>
|
||||||
{" "}
|
|
||||||
на сайте
|
|
||||||
</Typography>
|
|
||||||
</Box>
|
</Box>
|
||||||
<Box
|
<Box
|
||||||
sx={{
|
sx={{
|
||||||
|
|||||||
@ -165,7 +165,9 @@ const QuestionPageCardTitle = memo<Props>(function ({
|
|||||||
>
|
>
|
||||||
<Typography fontSize="14px">{title.length}</Typography>
|
<Typography fontSize="14px">{title.length}</Typography>
|
||||||
<span>/</span>
|
<span>/</span>
|
||||||
<Typography fontSize="14px">{maxLengthTextField}</Typography>
|
<Typography fontSize="14px">
|
||||||
|
{maxLengthTextField}
|
||||||
|
</Typography>
|
||||||
</Box>
|
</Box>
|
||||||
),
|
),
|
||||||
}}
|
}}
|
||||||
@ -279,7 +281,9 @@ const QuestionPageCardTitle = memo<Props>(function ({
|
|||||||
}}
|
}}
|
||||||
data-cy="delete-question"
|
data-cy="delete-question"
|
||||||
>
|
>
|
||||||
<DeleteIcon style={{ color: theme.palette.brightPurple.main }} />
|
<DeleteIcon
|
||||||
|
style={{ color: theme.palette.brightPurple.main }}
|
||||||
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
<Modal open={openDelete} onClose={() => setOpenDelete(false)}>
|
<Modal open={openDelete} onClose={() => setOpenDelete(false)}>
|
||||||
<Box
|
<Box
|
||||||
@ -350,23 +354,25 @@ const QuestionPageCardTitle = memo<Props>(function ({
|
|||||||
</Box>
|
</Box>
|
||||||
)}
|
)}
|
||||||
</Box>
|
</Box>
|
||||||
|
|
||||||
</Box>
|
</Box>
|
||||||
{questionType !== null &&
|
{questionType !== null && (
|
||||||
<Box sx={{
|
<Box
|
||||||
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
flexWrap: isMobile ? "wrap" : undefined,
|
flexWrap: isMobile ? "wrap" : undefined,
|
||||||
gap: "10px",
|
gap: "10px",
|
||||||
padding: "0 20px 20px 20px"
|
padding: "0 20px 20px 20px",
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<Typography>ID Вопроса</Typography>
|
<Typography>ID Вопроса</Typography>
|
||||||
<Typography
|
<Typography id={"id-copy"}>{questionBackendId}</Typography>
|
||||||
id={"id-copy"}
|
|
||||||
>{questionBackendId}</Typography>
|
|
||||||
<IconButton
|
<IconButton
|
||||||
edge="end"
|
edge="end"
|
||||||
onClick={() => navigator.clipboard.writeText(document.querySelector("#id-copy").innerText)
|
onClick={() =>
|
||||||
|
navigator.clipboard.writeText(
|
||||||
|
document.querySelector("#id-copy").innerText,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<CopyIconPurple
|
<CopyIconPurple
|
||||||
@ -375,7 +381,8 @@ const QuestionPageCardTitle = memo<Props>(function ({
|
|||||||
bgcolor={theme.palette.brightPurple.main}
|
bgcolor={theme.palette.brightPurple.main}
|
||||||
/>
|
/>
|
||||||
</IconButton>
|
</IconButton>
|
||||||
</Box>}
|
</Box>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@ -18,7 +18,8 @@ import {
|
|||||||
useMediaQuery,
|
useMediaQuery,
|
||||||
useTheme,
|
useTheme,
|
||||||
FormControl,
|
FormControl,
|
||||||
Popover, InputAdornment,
|
Popover,
|
||||||
|
InputAdornment,
|
||||||
} from "@mui/material";
|
} from "@mui/material";
|
||||||
import MiniButtonSetting from "@ui_kit/MiniButtonSetting";
|
import MiniButtonSetting from "@ui_kit/MiniButtonSetting";
|
||||||
|
|
||||||
@ -260,19 +261,22 @@ export const ResultCard = ({ resultContract, resultData }: Props) => {
|
|||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
<Box sx={{ p: "0 20px", pt: "10px" }}>
|
<Box sx={{ p: "0 20px", pt: "10px" }}>
|
||||||
<Box sx={{
|
<Box
|
||||||
|
sx={{
|
||||||
display: "flex",
|
display: "flex",
|
||||||
alignItems: "center",
|
alignItems: "center",
|
||||||
gap: "10px",
|
gap: "10px",
|
||||||
mb: "19px",
|
mb: "19px",
|
||||||
}}>
|
}}
|
||||||
|
>
|
||||||
<Typography>ID результата</Typography>
|
<Typography>ID результата</Typography>
|
||||||
<Typography
|
<Typography id={"id-copy"}>{resultData.backendId}</Typography>
|
||||||
id={"id-copy"}
|
|
||||||
>{resultData.backendId}</Typography>
|
|
||||||
<IconButton
|
<IconButton
|
||||||
edge="end"
|
edge="end"
|
||||||
onClick={() => navigator.clipboard.writeText(document.querySelector("#id-copy").innerText)
|
onClick={() =>
|
||||||
|
navigator.clipboard.writeText(
|
||||||
|
document.querySelector("#id-copy").innerText,
|
||||||
|
)
|
||||||
}
|
}
|
||||||
>
|
>
|
||||||
<CopyIcon
|
<CopyIcon
|
||||||
|
|||||||
@ -63,7 +63,9 @@ export const createTariffElements = (
|
|||||||
lineHeight: "21px",
|
lineHeight: "21px",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{currencyFormatter.format(Math.trunc(priceBeforeDiscounts) / 100)}
|
{currencyFormatter.format(
|
||||||
|
Math.trunc(priceBeforeDiscounts) / 100,
|
||||||
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
)}
|
)}
|
||||||
<Typography
|
<Typography
|
||||||
@ -74,7 +76,9 @@ export const createTariffElements = (
|
|||||||
color: "#4D4D4D",
|
color: "#4D4D4D",
|
||||||
}}
|
}}
|
||||||
>
|
>
|
||||||
{currencyFormatter.format(Math.trunc(priceAfterDiscounts) / 100)}
|
{currencyFormatter.format(
|
||||||
|
Math.trunc(priceAfterDiscounts) / 100,
|
||||||
|
)}
|
||||||
</Typography>
|
</Typography>
|
||||||
</>
|
</>
|
||||||
}
|
}
|
||||||
|
|||||||
@ -96,13 +96,15 @@ export const ExportResults = async (
|
|||||||
parseFilters(filterNew, filterDate),
|
parseFilters(filterNew, filterDate),
|
||||||
);
|
);
|
||||||
|
|
||||||
console.log(typeof data)
|
console.log(typeof data);
|
||||||
|
|
||||||
const blob = new Blob([data as BlobPart], { type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8" });
|
const blob = new Blob([data as BlobPart], {
|
||||||
|
type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8",
|
||||||
|
});
|
||||||
|
|
||||||
const link = document.createElement("a");
|
const link = document.createElement("a");
|
||||||
link.href = window.URL.createObjectURL(data as Blob);
|
link.href = window.URL.createObjectURL(data as Blob);
|
||||||
console.log(link)
|
console.log(link);
|
||||||
link.download = `report_${new Date().getTime()}.xlsx`;
|
link.download = `report_${new Date().getTime()}.xlsx`;
|
||||||
link.click();
|
link.click();
|
||||||
} catch (nativeError) {
|
} catch (nativeError) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user