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

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;
UTMs: number[];
FieldsRule: {
lead: { QuestionID: number }[];
contact: { ContactRuleMap: string }[];
company: { QuestionID: number }[];
customer: { QuestionID: number }[];
Lead: { QuestionID: number }[];
Contact: { ContactRuleMap: string }[];
Company: { QuestionID: number }[];
Customer: { QuestionID: number }[];
};
Deleted: boolean;
CreatedAt: number;

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

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

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