Merge branch 'dev' into 'staging'

Dev

See merge request frontend/squiz!352
This commit is contained in:
Nastya 2024-07-10 10:40:43 +00:00
commit ee788bd8ed
7 changed files with 19 additions and 18 deletions

@ -35,7 +35,8 @@ export const getAccount = async (): Promise<[AccountResponse | null, string?]> =
return [response];
} catch (nativeError) {
const [error] = parseAxiosError(nativeError);
return [null, `Не удалось получить информацию об аккаунте. ${error}`];
return [null, ""];
// return [null, `Не удалось получить информацию об аккаунте. ${error}`];
}
};

@ -53,8 +53,8 @@ export default function Analytics() {
});
const resetTime = () => {
setFrom(moment(0));
setTo(moment(Date.now()));
setFrom(moment(new Date(quiz.created_at)));
setTo(moment().add(1, "days"));
};
useEffect(() => {

@ -66,7 +66,7 @@ const FunnelItem = ({ title, percent, index, funnel }: FunnelItemProps) => {
},
}}
>
<IconButton
{/* <IconButton
sx={{ padding: "0", margin: "5px" }}
onClick={() => expandedHC(!isExpanded)}
>
@ -77,7 +77,7 @@ const FunnelItem = ({ title, percent, index, funnel }: FunnelItemProps) => {
rotate: isExpanded ? "180deg" : undefined
}}
/>
</IconButton>
</IconButton> */}
<Box
sx={{
display: "flex",

@ -28,7 +28,7 @@ export default function SettingsData({ questionId, isRequired, isDateRange, isTi
pt: isTablet ? "5px" : "0px",
}}
>
<Box
{/* <Box
sx={{
boxSizing: "border-box",
pt: "20px",
@ -71,7 +71,7 @@ export default function SettingsData({ questionId, isRequired, isDateRange, isTi
});
}}
/>
</Box>
</Box> */}
<Box
sx={{
boxSizing: "border-box",

@ -44,7 +44,7 @@ const SettingTextField = memo<SettingTextFieldProps>(function ({ questionId, isR
pt: isTablet ? "5px" : "0px",
}}
>
<Box
{/* <Box
sx={{
boxSizing: "border-box",
pt: "20px",
@ -93,7 +93,7 @@ const SettingTextField = memo<SettingTextFieldProps>(function ({ questionId, isR
/>
))}
</RadioGroup>
</Box>
</Box> */}
<Box
sx={{
boxSizing: "border-box",
@ -115,7 +115,7 @@ const SettingTextField = memo<SettingTextFieldProps>(function ({ questionId, isR
>
Настройки вопросов
</Typography>
<CustomCheckbox
{/* <CustomCheckbox
dataCy="checkbox-optional-autofill"
sx={{
display: isMobile ? "flex" : "block",
@ -129,7 +129,7 @@ const SettingTextField = memo<SettingTextFieldProps>(function ({ questionId, isR
question.content.autofill = e.target.checked;
});
}}
/>
/> */}
<CustomCheckbox
dataCy="checkbox-optional-question"
sx={{

@ -145,7 +145,7 @@ function TariffPage() {
link.href = `https://${isTestServer ? "s" : ""}hub.pena.digital/quizpayment?action=squizpay&dif=${cashDif}&data=${token}&userid=${userId}`;
document.body.appendChild(link);
console.log(link)
// link.click();
link.click();
return;
}

@ -36,12 +36,12 @@ export const parseAxiosError = (nativeError: unknown): [string, number?] => {
// return [error.response.statusText];
// }
if ("statusCode" in serverError) {
SEMessage = serverError?.message.toLowerCase() || "";
}
if ("error" in serverError && !("statusCode" in (error.response.data as ServerError))) {
SEMessage = serverError.error.toLowerCase() || "";
}
// if ("statusCode" in serverError) {
// SEMessage = serverError?.message.toLowerCase() || "";
// }
// if ("error" in serverError && !("statusCode" in (error.response.data as ServerError))) {
// SEMessage = serverError.error.toLowerCase() || "";
// }
const translatedMessage = translateMessage[SEMessage || ""]?.toLowerCase();
if (translatedMessage !== undefined) SEMessage = translatedMessage;
return [SEMessage || "", serverError.statusCode];