переименованы хранилища амо интеграции модалки

This commit is contained in:
Nastya 2024-06-10 23:26:07 +03:00
parent 6ae2b22d50
commit d9fbedcf77
4 changed files with 19 additions and 22 deletions

@ -239,10 +239,10 @@ export type IntegrationRules = {
StepID: number; StepID: number;
UTMs: number[]; UTMs: number[];
FieldsRule: { FieldsRule: {
lead: { QuestionID: number }[]; Lead: { QuestionID: number }[];
contact: { ContactRuleMap: string }[]; Contact: { ContactRuleMap: string }[];
company: { QuestionID: number }[]; Company: { QuestionID: number }[];
customer: { QuestionID: number }[]; Customer: { QuestionID: number }[];
}; };
Deleted: boolean; Deleted: boolean;
CreatedAt: number; CreatedAt: number;

@ -23,7 +23,7 @@ import { useQuestions } from "@/stores/questions/hooks";
import { redirect } from "react-router-dom"; import { redirect } from "react-router-dom";
import { enqueueSnackbar } from "notistack"; import { enqueueSnackbar } from "notistack";
export type TitleKeys = "contacts" | "company" | "deal" | "buyers"; export type TitleKeys = "Contact" | "Company" | "Lead" | "Customer";
export type TagQuestionObject = { export type TagQuestionObject = {
backendId: string; backendId: string;
title: string; title: string;
@ -37,7 +37,7 @@ type IntegrationsModalProps = {
quizID: number | undefined; quizID: number | undefined;
}; };
export type TagKeys = "contact" | "company" | "deal" | "buyer"; export type TagKeys = "Contact" | "Company" | "Lead" | "Customer";
export type TTags = Record<TagKeys, string[] | []>; export type TTags = Record<TagKeys, string[] | []>;
export const AmoCRMModal: FC<IntegrationsModalProps> = ({ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
@ -70,16 +70,16 @@ export const AmoCRMModal: FC<IntegrationsModalProps> = ({
string | null string | null
>(null); >(null);
const [questionEntity, setQuestionEntity] = useState<TQuestionEntity>({ const [questionEntity, setQuestionEntity] = useState<TQuestionEntity>({
deal: [], Lead: [],
contacts: [], Contact: [],
company: [], Company: [],
buyers: [], Customer: [],
}); });
const [tags, setTags] = useState<TTags>({ const [tags, setTags] = useState<TTags>({
deal: [], Lead: [],
contact: [], Contact: [],
company: [], Company: [],
buyer: [], Customer: [],
}); });
console.log(questionEntity) console.log(questionEntity)
console.log(tags) console.log(tags)

@ -15,13 +15,10 @@ export const Item: FC<ItemProps> = ({ title, onAddBtnClick, data }) => {
console.log("title") console.log("title")
console.log(data) console.log(data)
const titleDictionary = { const titleDictionary = {
contact: "Контакт", Company: "Компания",
company: "Компания", Lead: "Сделка",
deal: "Сделка", Contact: "Контакты",
buyer: "Покупатель", Customer: "Покупатели",
contacts: "Контакты",
users: "Пользователи",
buyers: "Покупатели",
}; };
const translatedTitle = titleDictionary[title]; const translatedTitle = titleDictionary[title];

@ -4,7 +4,7 @@ import { StepButtonsBlock } from "../../StepButtonsBlock/StepButtonsBlock";
import { FC } from "react"; import { FC } from "react";
import { TQuestionEntity } from "../../AmoCRMModal"; import { TQuestionEntity } from "../../AmoCRMModal";
type TitleKeys = "contacts" | "company" | "deal" | "buyers"; type TitleKeys = "Contact" | "Company" | "Lead" | "Customer";
type ItemDetailsViewProps = { type ItemDetailsViewProps = {
setIsSelection: (value: boolean) => void; setIsSelection: (value: boolean) => void;