Rename compose file to docker-compose.yml
This commit is contained in:
@@ -200,7 +200,20 @@ async function buildCrmSnapshot(input: SnapshotOptions) {
|
||||
take: 4,
|
||||
},
|
||||
deals: {
|
||||
select: { id: true, title: true, stage: true, amount: true, updatedAt: true, nextStep: true, summary: true },
|
||||
select: {
|
||||
id: true,
|
||||
title: true,
|
||||
stage: true,
|
||||
amount: true,
|
||||
updatedAt: true,
|
||||
nextStep: true,
|
||||
summary: true,
|
||||
currentStepId: true,
|
||||
steps: {
|
||||
select: { id: true, title: true, status: true, dueAt: true, order: true, completedAt: true },
|
||||
orderBy: [{ order: "asc" }, { createdAt: "asc" }],
|
||||
},
|
||||
},
|
||||
orderBy: { updatedAt: "desc" },
|
||||
take: 3,
|
||||
},
|
||||
@@ -221,7 +234,10 @@ async function buildCrmSnapshot(input: SnapshotOptions) {
|
||||
where: { teamId: input.teamId },
|
||||
orderBy: { updatedAt: "desc" },
|
||||
take: 20,
|
||||
include: { contact: { select: { name: true, company: true } } },
|
||||
include: {
|
||||
contact: { select: { name: true, company: true } },
|
||||
steps: { select: { id: true, title: true, status: true, dueAt: true, order: true, completedAt: true }, orderBy: [{ order: "asc" }, { createdAt: "asc" }] },
|
||||
},
|
||||
}),
|
||||
prisma.workspaceDocument.findMany({
|
||||
where: { teamId: input.teamId },
|
||||
@@ -270,6 +286,15 @@ async function buildCrmSnapshot(input: SnapshotOptions) {
|
||||
amount: d.amount,
|
||||
nextStep: d.nextStep,
|
||||
summary: d.summary,
|
||||
currentStepId: d.currentStepId,
|
||||
steps: d.steps.map((s) => ({
|
||||
id: s.id,
|
||||
title: s.title,
|
||||
status: s.status,
|
||||
dueAt: s.dueAt ? iso(s.dueAt) : null,
|
||||
order: s.order,
|
||||
completedAt: s.completedAt ? iso(s.completedAt) : null,
|
||||
})),
|
||||
updatedAt: iso(d.updatedAt),
|
||||
contact: {
|
||||
name: d.contact.name,
|
||||
@@ -310,6 +335,15 @@ async function buildCrmSnapshot(input: SnapshotOptions) {
|
||||
amount: d.amount,
|
||||
nextStep: d.nextStep,
|
||||
summary: d.summary,
|
||||
currentStepId: d.currentStepId,
|
||||
steps: d.steps.map((s) => ({
|
||||
id: s.id,
|
||||
title: s.title,
|
||||
status: s.status,
|
||||
dueAt: s.dueAt ? iso(s.dueAt) : null,
|
||||
order: s.order,
|
||||
completedAt: s.completedAt ? iso(s.completedAt) : null,
|
||||
})),
|
||||
updatedAt: iso(d.updatedAt),
|
||||
})),
|
||||
pins: c.pins.map((p) => ({
|
||||
@@ -621,7 +655,10 @@ export async function runLangGraphCrmAgentFor(input: {
|
||||
where: { teamId: input.teamId, ...(raw.stage ? { stage: raw.stage } : {}) },
|
||||
orderBy: { updatedAt: "desc" },
|
||||
take: Math.max(1, Math.min(raw.limit ?? 20, 100)),
|
||||
include: { contact: { select: { name: true, company: true } } },
|
||||
include: {
|
||||
contact: { select: { name: true, company: true } },
|
||||
steps: { select: { id: true, title: true, status: true, dueAt: true, order: true, completedAt: true }, orderBy: [{ order: "asc" }, { createdAt: "asc" }] },
|
||||
},
|
||||
});
|
||||
return JSON.stringify(
|
||||
items.map((d) => ({
|
||||
@@ -631,6 +668,15 @@ export async function runLangGraphCrmAgentFor(input: {
|
||||
amount: d.amount,
|
||||
nextStep: d.nextStep,
|
||||
summary: d.summary,
|
||||
currentStepId: d.currentStepId,
|
||||
steps: d.steps.map((s) => ({
|
||||
id: s.id,
|
||||
title: s.title,
|
||||
status: s.status,
|
||||
dueAt: s.dueAt ? s.dueAt.toISOString() : null,
|
||||
order: s.order,
|
||||
completedAt: s.completedAt ? s.completedAt.toISOString() : null,
|
||||
})),
|
||||
contact: d.contact.name,
|
||||
company: d.contact.company,
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user