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