diff --git a/src/api/integration.ts b/src/api/integration.ts index efa22fa8..6a253808 100644 --- a/src/api/integration.ts +++ b/src/api/integration.ts @@ -12,6 +12,7 @@ const API_URL = `${process.env.REACT_APP_DOMAIN}/squiz/amocrm`; export type AccountResponse = { ID: number; + AmoUserID: number; AccountID: string; AmoID: number; Name: string; diff --git a/src/components/CustomRadioGroup/CustomRadioGroup.tsx b/src/components/CustomRadioGroup/CustomRadioGroup.tsx index e83d8071..335d0f8b 100644 --- a/src/components/CustomRadioGroup/CustomRadioGroup.tsx +++ b/src/components/CustomRadioGroup/CustomRadioGroup.tsx @@ -5,7 +5,7 @@ import RadioGroup from "@mui/material/RadioGroup"; import FormControlLabel from "@mui/material/FormControlLabel"; import Box from "@mui/material/Box"; import CheckboxIcon from "@icons/Checkbox"; -import { Typography, useTheme } from "@mui/material"; +import { Typography, useMediaQuery, useTheme } from "@mui/material"; import { getPipelines, getSteps, @@ -32,6 +32,9 @@ export const CustomRadioGroup: FC = ({ pipelineId, }) => { const theme = useTheme(); + + const isMobile = useMediaQuery(theme.breakpoints.down(500)); + const [currentValue, setCurrentValue] = useState( selectedValue, ); @@ -117,7 +120,7 @@ export const CustomRadioGroup: FC = ({ = ({ currentValue === pipeline.Name ? theme.palette.background.default : theme.palette.common.white, + "&.MuiFormControlLabel-root > .MuiTypography-root": { + width: "200px", + overflow: "hidden", + textOverflow: "ellipsis" + } }} - value={pipeline.Name} + value={pipeline.ID} control={ = ({ - {value} + {value || "нет данных"} + + + ); + + const infoItemLink = (title: string, link: string) => ( + + + + {title}: + + + + {link} ); @@ -52,12 +71,11 @@ export const AmoAccountInfo: FC = ({ gap: isMobile ? "10px" : "20px", }} > - {infoItem("Amo ID", accountInfo.AmoID)} + {infoItem("Amo ID", accountInfo.AmoUserID)} {infoItem("Имя аккаунта", accountInfo.Name)} {infoItem("Email аккаунта", accountInfo.Email)} - {infoItem("Роль", accountInfo.Role)} - {infoItem("Группа пользователя", accountInfo.Group)} - {infoItem("URL профиля пользователя в Amo", accountInfo.Subdomain)} + {infoItemLink("ЛК в amo", `https://${accountInfo.Subdomain}.amocrm.ru/dashboard/`)} + {infoItemLink("Профиль пользователя в amo", `https://${accountInfo.Subdomain}.amocrm.ru/settings/users/`)} {infoItem("Страна пользователя", accountInfo.Country)} = ({ company: [], buyer: [], }); + console.log(accountInfo) useEffect(() => { if (isModalOpen) { @@ -176,6 +177,7 @@ export const AmoCRMModal: FC = ({ }, ], [ + accountInfo, questionEntity, selectedPipelinePerformer, selectedPipeline, diff --git a/src/pages/Landing/WhatTheFeatures.tsx b/src/pages/Landing/WhatTheFeatures.tsx index 0ddce921..b0d12961 100644 --- a/src/pages/Landing/WhatTheFeatures.tsx +++ b/src/pages/Landing/WhatTheFeatures.tsx @@ -321,7 +321,6 @@ export default function Component() { > Аналитика - (в разработке)