remove contact company/country/location across db and ui

This commit is contained in:
Ruslan Bakiev
2026-02-23 14:52:26 +07:00
parent f6b738352b
commit 60b9bb9fd1
15 changed files with 42 additions and 135 deletions

View File

@@ -509,9 +509,6 @@ async function getContacts(auth: AuthContext | null) {
id: c.id,
name: c.name,
avatar: c.avatarUrl ?? "",
company: c.company ?? "",
country: c.country ?? "",
location: c.location ?? "",
channels: Array.from(channelsByContactId.get(c.id) ?? []),
lastContactAt: c.messages[0]?.occurredAt?.toISOString?.() ?? c.updatedAt.toISOString(),
description: c.note?.content ?? "",
@@ -706,7 +703,7 @@ async function getDeals(auth: AuthContext | null) {
const dealsRaw = await prisma.deal.findMany({
where: { teamId: ctx.teamId },
include: {
contact: { select: { name: true, company: true } },
contact: { select: { name: true } },
steps: { orderBy: [{ order: "asc" }, { createdAt: "asc" }] },
},
orderBy: { updatedAt: "desc" },
@@ -717,7 +714,6 @@ async function getDeals(auth: AuthContext | null) {
id: d.id,
contact: d.contact.name,
title: d.title,
company: d.contact.company ?? "",
stage: d.stage,
amount: d.amount ? String(d.amount) : "",
nextStep: d.nextStep ?? "",
@@ -1999,9 +1995,6 @@ export const crmGraphqlSchema = buildSchema(`
id: ID!
name: String!
avatar: String!
company: String!
country: String!
location: String!
channels: [String!]!
lastContactAt: String!
description: String!
@@ -2054,7 +2047,6 @@ export const crmGraphqlSchema = buildSchema(`
id: ID!
contact: String!
title: String!
company: String!
stage: String!
amount: String!
nextStep: String!