Merge branch 'dev' into 'staging'
иф для пользователя 6692e068983ee77f8e1e682e See merge request frontend/squiz!357
This commit is contained in:
commit
100882bbda
@ -131,11 +131,6 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({ isModalOpen, handleClo
|
||||
|
||||
if (type === "question") {
|
||||
const q = questions.find(e => e.backendId === Number(id))
|
||||
console.log("ПРОЦЕССНАЧАЛАДОБАВЛЕНИЯ")
|
||||
console.log("ВАПРОСААААААААА")
|
||||
console.log(q)
|
||||
console.log(questions)
|
||||
console.log(id)
|
||||
setSelectedQuestions((prevState) => ({
|
||||
...prevState,
|
||||
[scope]: [...prevState[scope as QuestionKeys], {
|
||||
|
@ -28,6 +28,7 @@ export const AmoDeleteTagQuestion: FC<Props> = ({ close, deleteItem }) => {
|
||||
variant="contained"
|
||||
sx={{
|
||||
width: "150px",
|
||||
mb: "15px"
|
||||
}}
|
||||
onClick={close}
|
||||
>
|
||||
@ -37,6 +38,7 @@ export const AmoDeleteTagQuestion: FC<Props> = ({ close, deleteItem }) => {
|
||||
variant="contained"
|
||||
sx={{
|
||||
width: "150px",
|
||||
mb: "15px"
|
||||
}}
|
||||
onClick={deleteItem}
|
||||
>
|
||||
|
@ -55,6 +55,7 @@ export const AmoRemoveAccount: FC<Props> = ({
|
||||
variant="contained"
|
||||
sx={{
|
||||
width: "150px",
|
||||
mb: "15px"
|
||||
}}
|
||||
onClick={removeAccount}
|
||||
>сменить</Button>
|
||||
|
@ -7,6 +7,7 @@ import { VKPixelLogo } from "../mocks/VKPixelLogo";
|
||||
import { QuizMetricType } from "@model/quizSettings";
|
||||
import { AmoCRMLogo } from "../mocks/AmoCRMLogo";
|
||||
import { useCurrentQuiz } from "@/stores/quizes/hooks";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
|
||||
const AnalyticsModal = lazy(() =>
|
||||
import("./AnalyticsModal/AnalyticsModal").then((module) => ({
|
||||
@ -46,6 +47,8 @@ export const PartnersBoard: FC<PartnersBoardProps> = ({
|
||||
|
||||
const quiz = useCurrentQuiz();
|
||||
|
||||
const user = useUserStore();
|
||||
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
@ -56,30 +59,35 @@ export const PartnersBoard: FC<PartnersBoardProps> = ({
|
||||
}}
|
||||
>
|
||||
<Box>
|
||||
<Typography
|
||||
variant="h6"
|
||||
sx={{
|
||||
textAlign: { xs: "start", sm: "start", md: "start" },
|
||||
lineHeight: "1",
|
||||
marginBottom: "12px",
|
||||
}}
|
||||
>
|
||||
CRM
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
flexWrap: "wrap",
|
||||
justifyContent: { xs: "start", sm: "start", md: "start" },
|
||||
}}
|
||||
>
|
||||
<ServiceButton
|
||||
logo={<AmoCRMLogo />}
|
||||
setIsModalOpen={setIsAmoCrmModalOpen}
|
||||
setCompanyName={setCompanyName}
|
||||
name={"amoCRM"}
|
||||
/>
|
||||
</Box>
|
||||
{
|
||||
user.user._id === "6692e068983ee77f8e1e682e" &&
|
||||
<>
|
||||
<Typography
|
||||
variant="h6"
|
||||
sx={{
|
||||
textAlign: { xs: "start", sm: "start", md: "start" },
|
||||
lineHeight: "1",
|
||||
marginBottom: "12px",
|
||||
}}
|
||||
>
|
||||
CRM
|
||||
</Typography>
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
flexWrap: "wrap",
|
||||
justifyContent: { xs: "start", sm: "start", md: "start" },
|
||||
}}
|
||||
>
|
||||
<ServiceButton
|
||||
logo={<AmoCRMLogo />}
|
||||
setIsModalOpen={setIsAmoCrmModalOpen}
|
||||
setCompanyName={setCompanyName}
|
||||
name={"amoCRM"}
|
||||
/>
|
||||
</Box>
|
||||
</>
|
||||
}
|
||||
|
||||
<Typography
|
||||
variant="h6"
|
||||
|
@ -1,15 +1,18 @@
|
||||
import {Link, useNavigate} from "react-router-dom";
|
||||
import {Box, Button, Typography, useMediaQuery, useTheme} from "@mui/material";
|
||||
import {ReactComponent as TemplateIcon} from "@/assets/quiz-templates/template.svg";
|
||||
import {createQuiz, resetEditConfig} from "@root/quizes/actions";
|
||||
import { Link, useNavigate } from "react-router-dom";
|
||||
import { Box, Button, Typography, useMediaQuery, useTheme } from "@mui/material";
|
||||
import { ReactComponent as TemplateIcon } from "@/assets/quiz-templates/template.svg";
|
||||
import { createQuiz, resetEditConfig } from "@root/quizes/actions";
|
||||
import React from "react";
|
||||
import { useUserStore } from "@/stores/user";
|
||||
|
||||
export default function CreateButtons ({mt}: string) {
|
||||
export default function CreateButtons({ mt }: string) {
|
||||
const navigate = useNavigate();
|
||||
const theme = useTheme();
|
||||
const user = useUserStore();
|
||||
console.log(user)
|
||||
const isMobile = useMediaQuery(theme.breakpoints.down(500));
|
||||
|
||||
return(
|
||||
return (
|
||||
<Box
|
||||
sx={{
|
||||
display: "flex",
|
||||
@ -18,27 +21,31 @@ export default function CreateButtons ({mt}: string) {
|
||||
marginTop: mt,
|
||||
}}
|
||||
>
|
||||
<Link to="/gallery" style={{ textDecoration: "none" }}>
|
||||
<Button
|
||||
sx={{
|
||||
display: "flex",
|
||||
gap: "10px",
|
||||
padding: "13px",
|
||||
borderRadius: "8px",
|
||||
background: "#9A9AAF17",
|
||||
color: theme.palette.brightPurple.main,
|
||||
transition: ".2s",
|
||||
"&:hover": {
|
||||
color: theme.palette.background.paper,
|
||||
background: theme.palette.brightPurple.main,
|
||||
"& svg path": { stroke: theme.palette.background.paper },
|
||||
},
|
||||
}}
|
||||
>
|
||||
<TemplateIcon />
|
||||
{!isMobile && <Typography>Посмотреть шаблоны</Typography>}
|
||||
</Button>
|
||||
</Link>
|
||||
{
|
||||
user.user._id === "6692e068983ee77f8e1e682e" &&
|
||||
<Link to="/gallery" style={{ textDecoration: "none" }}>
|
||||
<Button
|
||||
sx={{
|
||||
display: "flex",
|
||||
gap: "10px",
|
||||
padding: "13px",
|
||||
borderRadius: "8px",
|
||||
background: "#9A9AAF17",
|
||||
color: theme.palette.brightPurple.main,
|
||||
transition: ".2s",
|
||||
"&:hover": {
|
||||
color: theme.palette.background.paper,
|
||||
background: theme.palette.brightPurple.main,
|
||||
"& svg path": { stroke: theme.palette.background.paper },
|
||||
},
|
||||
}}
|
||||
>
|
||||
<TemplateIcon />
|
||||
{!isMobile && <Typography>Посмотреть шаблоны</Typography>}
|
||||
</Button>
|
||||
</Link>
|
||||
|
||||
}
|
||||
<Button
|
||||
variant="contained"
|
||||
sx={{
|
||||
|
Loading…
Reference in New Issue
Block a user